Do not check last log time when we join GC if we don't log

This commit is contained in:
Jean-Marie Traissard 2007-09-15 13:38:55 +00:00
parent 76b6680650
commit 9091496812
1 changed files with 7 additions and 2 deletions

View File

@ -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