From 3d4688e9fac9e929016dafc166edee8bc1cb20e3 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 26 Nov 2009 08:27:31 +0100 Subject: [PATCH] request archiving logs only since last time we requested it --- src/common/config.py | 1 + src/gui_interface.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/config.py b/src/common/config.py index 92279c6d3..d49613b59 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -352,6 +352,7 @@ class Config: 'send_os_info': [ opt_bool, True ], 'log_encrypted_sessions': [opt_bool, True, _('When negotiating an encrypted session, should Gajim assume you want your messages to be logged?')], 'roster_version': [opt_str, ''], + 'last_archiving_time': [opt_str, '1970-01-01T00:00:00Z', _('Last time we syncronized with logs from server.')], }, {}), 'statusmsg': ({ 'message': [ opt_str, '' ], diff --git a/src/gui_interface.py b/src/gui_interface.py index 864107671..e4dc996d1 100644 --- a/src/gui_interface.py +++ b/src/gui_interface.py @@ -1563,7 +1563,9 @@ class Interface: self.enable_music_listener() # Start merging logs from server gajim.connections[account].request_modifications_page( - '1970-01-01T00:00:00Z') + gajim.config.get_per('accounts', account, 'last_archiving_time')) + gajim.config.set_per('accounts', account, 'last_archiving_time', + time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime())) def handle_event_metacontacts(self, account, tags_list): gajim.contacts.define_metacontacts(account, tags_list)