Fixed a minor bug in the calculation of the date for room history request. Thanks Zash for the report.
This commit is contained in:
parent
0699e2e3a1
commit
714b7d965d
|
@ -2017,12 +2017,8 @@ 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')
|
||||||
last_date = self.last_history_time[room_jid]
|
last_date = self.last_history_time[room_jid]
|
||||||
if last_date == 0:
|
last_date = max(self.last_history_time[room_jid],
|
||||||
last_date = time.time() - gajim.config.get(
|
time.time() - gajim.config.get('muc_restore_timeout') * 60)
|
||||||
'muc_restore_timeout') * 60
|
|
||||||
else:
|
|
||||||
last_date = min(last_date, time.time() - gajim.config.get(
|
|
||||||
'muc_restore_timeout') * 60)
|
|
||||||
last_date = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime(last_date))
|
last_date = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime(last_date))
|
||||||
t.setTag('history', {'maxstanzas': gajim.config.get(
|
t.setTag('history', {'maxstanzas': gajim.config.get(
|
||||||
'muc_restore_lines'), 'since': last_date})
|
'muc_restore_lines'), 'since': last_date})
|
||||||
|
|
Loading…
Reference in New Issue