From f455e974c118a62ac4496bb48b5f0913fdefa095 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 1 Jan 2006 19:05:59 +0000 Subject: [PATCH] new ACE option: send_sha_in_gc_presence that allow to send sha info in groupchat presences --- src/common/config.py | 1 + src/common/connection.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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)