don't allow to send custom status nor revoke subscription for transport contacts. fixes #3984
This commit is contained in:
parent
e5f682a81a
commit
3fe89676ac
|
@ -5021,7 +5021,10 @@ class RosterWindow:
|
||||||
if group in gajim.connections[account].blocked_groups:
|
if group in gajim.connections[account].blocked_groups:
|
||||||
blocked = True
|
blocked = True
|
||||||
break
|
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( \
|
send_custom_status_menuitem.set_image( \
|
||||||
gtkgui_helpers.load_icon('offline'))
|
gtkgui_helpers.load_icon('offline'))
|
||||||
send_custom_status_menuitem.set_sensitive(False)
|
send_custom_status_menuitem.set_sensitive(False)
|
||||||
|
@ -5137,7 +5140,8 @@ class RosterWindow:
|
||||||
ask_auth_menuitem.connect('activate', self.req_sub, jid,
|
ask_auth_menuitem.connect('activate', self.req_sub, jid,
|
||||||
_('I would like to add you to my roster'), account,
|
_('I would like to add you to my roster'), account,
|
||||||
contact.groups, contact.name)
|
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)
|
revoke_auth_menuitem.set_sensitive(False)
|
||||||
else:
|
else:
|
||||||
revoke_auth_menuitem.connect('activate', self.revoke_auth, jid,
|
revoke_auth_menuitem.connect('activate', self.revoke_auth, jid,
|
||||||
|
|
Loading…
Reference in New Issue