From 9091496812d5992e327c9f0fe53ba161a55cf0f6 Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard Date: Sat, 15 Sep 2007 13:38:55 +0000 Subject: [PATCH] Do not check last log time when we join GC if we don't log --- src/common/connection.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/common/connection.py b/src/common/connection.py index 26fd39af0..70a57428b 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -1248,8 +1248,13 @@ class Connection(ConnectionHandlers): # last date/time in history to avoid duplicate if not self.last_history_line.has_key(room_jid): # Not in memory, get it from DB - last_log = gajim.logger.get_last_date_that_has_logs(room_jid, - is_room = True) + last_log = None + no_log_for = gajim.config.get_per('accounts', self.name, 'no_log_for')\ + .split() + if self.name not in no_log_for and room_jid not in no_log_for: + # Do not check if we are not logging for this room + last_log = gajim.logger.get_last_date_that_has_logs(room_jid, + is_room = True) if last_log is None: last_log = 0 self.last_history_line[room_jid]= last_log