ability to store muc_restore_* per room JID. Fixes #7276
This commit is contained in:
parent
97bd4d5152
commit
0c6117a778
|
@ -2381,7 +2381,12 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
if not change_nick:
|
if not change_nick:
|
||||||
t = p.setTag(common.xmpp.NS_MUC + ' x')
|
t = p.setTag(common.xmpp.NS_MUC + ' x')
|
||||||
tags = {}
|
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:
|
if timeout >= 0:
|
||||||
last_date = self.last_history_time[room_jid]
|
last_date = self.last_history_time[room_jid]
|
||||||
if last_date == 0:
|
if last_date == 0:
|
||||||
|
@ -2391,7 +2396,9 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
last_date = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime(
|
last_date = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime(
|
||||||
last_date))
|
last_date))
|
||||||
tags['since'] = 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:
|
if nb >= 0:
|
||||||
tags['maxstanzas'] = nb
|
tags['maxstanzas'] = nb
|
||||||
if tags:
|
if tags:
|
||||||
|
|
Loading…
Reference in New Issue