diff --git a/src/common/config.py b/src/common/config.py index 0dce58706..5a72d14fb 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -174,6 +174,7 @@ class Config: 'roster_window_skip_taskbar': [opt_bool, False], 'use_urgency_hint': [opt_bool, True, _('If True and installed GTK+ and PyGTK versions are at least 2.8, make the window flash (the default behaviour in most Window Managers) when holding pending events.')], 'notification_timeout': [opt_int, 5], + 'send_sha_in_gc_presence': [opt_bool, True, _('Jabberd1.4 does not like sha info when one join a password protected room. Turn this option to False to stop sending sha info in groupchat presences')], } __options_per_key = { diff --git a/src/common/connection.py b/src/common/connection.py index 5be1089ae..2010d7a20 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -2182,7 +2182,8 @@ class Connection: show = helpers.get_xmpp_show(STATUS_LIST[self.connected]) p = common.xmpp.Presence(to = '%s@%s/%s' % (room, server, nick), show = show, status = self.status) - p = self.add_sha(p) + if gajim.config.get('send_sha_in_gc_presence'): + p = self.add_sha(p) t = p.setTag(common.xmpp.NS_MUC + ' x') if password: t.setTagData('password', password) @@ -2228,7 +2229,8 @@ class Connection: show = helpers.get_xmpp_show(show) p = common.xmpp.Presence(to = '%s/%s' % (jid, nick), typ = ptype, show = show, status = status) - p = self.add_sha(p) + if gajim.config.get('send_sha_in_gc_presence'): + p = self.add_sha(p) # send instantly so when we go offline, status is sent to gc before we # disconnect from jabber server self.connection.send(p)