From 714b7d965dcd1f9275186349287adaf13f9eb7ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=C3=ABl=20Verrier?= Date: Sun, 3 Jan 2010 01:49:49 +0100 Subject: [PATCH] Fixed a minor bug in the calculation of the date for room history request. Thanks Zash for the report. --- src/common/connection.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index 347e30796..6f46cec2d 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -2017,12 +2017,8 @@ class Connection(CommonConnection, ConnectionHandlers): if not change_nick: t = p.setTag(common.xmpp.NS_MUC + ' x') last_date = self.last_history_time[room_jid] - if last_date == 0: - last_date = time.time() - gajim.config.get( - 'muc_restore_timeout') * 60 - else: - last_date = min(last_date, time.time() - gajim.config.get( - 'muc_restore_timeout') * 60) + last_date = max(self.last_history_time[room_jid], + time.time() - gajim.config.get('muc_restore_timeout') * 60) last_date = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime(last_date)) t.setTag('history', {'maxstanzas': gajim.config.get( 'muc_restore_lines'), 'since': last_date})