changeset 0a5aa768f117 in /home/hg/repos/gajim

details:http://hg.gajim.org/gajim?cmd=changeset;node=0a5aa768f117
description: simplify code to compute how many logs do we request when we 
re-join a room

diffstat:

 src/common/connection.py |  6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diffs (20 lines):

diff -r 8d4593f3997f -r 0a5aa768f117 src/common/connection.py
--- a/src/common/connection.py  Wed Feb 22 10:07:16 2012 +0100
+++ b/src/common/connection.py  Wed Feb 22 15:36:35 2012 +0100
@@ -2349,15 +2349,11 @@
                 last_date = self.last_history_time[room_jid]
                 if last_date == 0:
                     last_date = time.time() - timeout
-                else:
+                elif not rejoin:
                     last_date = min(last_date, time.time() - timeout)
                 last_date = time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime(
                     last_date))
                 tags['since'] = last_date
-                if rejoin:
-                    tags['since'] = time.strftime('%Y-%m-%dT%H:%M:%SZ',
-                    time.gmtime(gajim.logger.get_last_date_that_has_logs(
-                    room_jid, is_room=True)))
             nb = gajim.config.get('muc_restore_lines')
             if nb >= 0:
                 tags['maxstanzas'] = nb
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to