From 3fe89676acb37611f257546e712b528c8155bc71 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 2 Jun 2008 10:27:16 +0000 Subject: [PATCH] don't allow to send custom status nor revoke subscription for transport contacts. fixes #3984 --- src/roster_window.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 623078279..a8377d1c3 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -5021,7 +5021,10 @@ class RosterWindow: if group in gajim.connections[account].blocked_groups: blocked = True break - if blocked: + if gajim.get_transport_name_from_jid(jid, use_config_setting=False): + # Transport contact, send custom status unavailable + send_custom_status_menuitem.set_sensitive(False) + elif blocked: send_custom_status_menuitem.set_image( \ gtkgui_helpers.load_icon('offline')) send_custom_status_menuitem.set_sensitive(False) @@ -5137,7 +5140,8 @@ class RosterWindow: ask_auth_menuitem.connect('activate', self.req_sub, jid, _('I would like to add you to my roster'), account, contact.groups, contact.name) - if contact.sub in ('to', 'none'): + if contact.sub in ('to', 'none') or gajim.get_transport_name_from_jid( + jid, use_config_setting=False): revoke_auth_menuitem.set_sensitive(False) else: revoke_auth_menuitem.connect('activate', self.revoke_auth, jid,