keep in config file room.JID.muc_restore_*. Fixes #7276
This commit is contained in:
parent
d1adec53be
commit
34163e508b
|
@ -477,6 +477,8 @@ class Config:
|
||||||
}, {}),
|
}, {}),
|
||||||
'rooms': ({
|
'rooms': ({
|
||||||
'speller_language': [ opt_str, '', _('Language for which we want to check misspelled words')],
|
'speller_language': [ opt_str, '', _('Language for which we want to check misspelled words')],
|
||||||
|
'muc_restore_lines': [opt_int, -2, _('How many lines to request from server when entering a groupchat. -1 means no limit, -2 means global value')],
|
||||||
|
'muc_restore_timeout': [opt_int, -2, _('How many minutes back to request logs when a entering a groupchat. -1 means no limit, -2 means global value')],
|
||||||
}, {}),
|
}, {}),
|
||||||
'plugins': ({
|
'plugins': ({
|
||||||
'active': [opt_bool, False, _('State whether plugins should be activated on startup (this is saved on Gajim exit). This option SHOULD NOT be used to (de)activate plug-ins. Use GUI instead.')],
|
'active': [opt_bool, False, _('State whether plugins should be activated on startup (this is saved on Gajim exit). This option SHOULD NOT be used to (de)activate plug-ins. Use GUI instead.')],
|
||||||
|
|
|
@ -2380,10 +2380,9 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
tags = {}
|
tags = {}
|
||||||
timeout = gajim.config.get_per('room', room_jid,
|
timeout = gajim.config.get_per('room', room_jid,
|
||||||
'muc_restore_timeout')
|
'muc_restore_timeout')
|
||||||
if timeout is None:
|
if timeout is None or timeout == -2:
|
||||||
timeout = gajim.config.get('muc_restore_timeout') * 60
|
timeout = gajim.config.get('muc_restore_timeout')
|
||||||
else:
|
timeout *= 60
|
||||||
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:
|
||||||
|
@ -2394,7 +2393,7 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
last_date))
|
last_date))
|
||||||
tags['since'] = last_date
|
tags['since'] = last_date
|
||||||
nb = gajim.config.get_per('room', room_jid, 'muc_restore_lines')
|
nb = gajim.config.get_per('room', room_jid, 'muc_restore_lines')
|
||||||
if nb is None:
|
if nb is None or nb == -2:
|
||||||
nb = gajim.config.get('muc_restore_lines')
|
nb = gajim.config.get('muc_restore_lines')
|
||||||
if nb >= 0:
|
if nb >= 0:
|
||||||
tags['maxstanzas'] = nb
|
tags['maxstanzas'] = nb
|
||||||
|
|
Loading…
Reference in New Issue