changeset a026afdb8095 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=a026afdb8095 description: ability to store muc_restore_* per room JID. Fixes #7276
diffstat:
src/common/connection.py | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r f08e1904c7f9 -r a026afdb8095 src/common/connection.py --- a/src/common/connection.py Sun Dec 09 11:51:36 2012 +0100 +++ b/src/common/connection.py Sun Dec 09 17:07:50 2012 +0100 @@ -2381,7 +2381,12 @@ if not change_nick: t = p.setTag(common.xmpp.NS_MUC + ' x') tags = {} - timeout = gajim.config.get('muc_restore_timeout') * 60 + timeout = gajim.config.get_per('room', room_jid, + 'muc_restore_timeout') + if timeout is None: + timeout = gajim.config.get('muc_restore_timeout') * 60 + else: + timeout *= 60 if timeout >= 0: last_date = self.last_history_time[room_jid] if last_date == 0: @@ -2391,7 +2396,9 @@ last_date = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime( last_date)) tags['since'] = last_date - nb = gajim.config.get('muc_restore_lines') + nb = gajim.config.get_per('room', room_jid, 'muc_restore_lines') + if nb is None: + nb = gajim.config.get('muc_restore_lines') if nb >= 0: tags['maxstanzas'] = nb if tags: