new ACE option: send_sha_in_gc_presence that allow to send sha info in groupchat presences

This commit is contained in:
Yann Leboulanger 2006-01-01 19:05:59 +00:00
parent 7928e82d48
commit f455e974c1
2 changed files with 5 additions and 2 deletions

View File

@ -174,6 +174,7 @@ class Config:
'roster_window_skip_taskbar': [opt_bool, False], '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.')], '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], '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 = { __options_per_key = {

View File

@ -2182,6 +2182,7 @@ class Connection:
show = helpers.get_xmpp_show(STATUS_LIST[self.connected]) show = helpers.get_xmpp_show(STATUS_LIST[self.connected])
p = common.xmpp.Presence(to = '%s@%s/%s' % (room, server, nick), p = common.xmpp.Presence(to = '%s@%s/%s' % (room, server, nick),
show = show, status = self.status) show = show, status = self.status)
if gajim.config.get('send_sha_in_gc_presence'):
p = self.add_sha(p) p = self.add_sha(p)
t = p.setTag(common.xmpp.NS_MUC + ' x') t = p.setTag(common.xmpp.NS_MUC + ' x')
if password: if password:
@ -2228,6 +2229,7 @@ class Connection:
show = helpers.get_xmpp_show(show) show = helpers.get_xmpp_show(show)
p = common.xmpp.Presence(to = '%s/%s' % (jid, nick), typ = ptype, p = common.xmpp.Presence(to = '%s/%s' % (jid, nick), typ = ptype,
show = show, status = status) show = show, status = status)
if gajim.config.get('send_sha_in_gc_presence'):
p = self.add_sha(p) p = self.add_sha(p)
# send instantly so when we go offline, status is sent to gc before we # send instantly so when we go offline, status is sent to gc before we
# disconnect from jabber server # disconnect from jabber server