don't show pm event twice when we restore conversation. fixes #2621

This commit is contained in:
Yann Leboulanger 2006-11-01 17:09:10 +00:00
parent 6466c45d74
commit f0f5243e32
1 changed files with 2 additions and 2 deletions

View File

@ -1609,13 +1609,13 @@ class ChatControl(ChatControlBase):
return
timeout = gajim.config.get('restore_timeout') # in minutes
events = gajim.events.get_events(self.account, jid, ['chat'])
events = gajim.events.get_events(self.account, jid, ['chat', 'pm'])
# number of messages that are in queue and are already logged, we want
# to avoid duplication
pending_how_many = len(events)
rows = gajim.logger.get_last_conversation_lines(jid, restore_how_many,
pending_how_many, timeout, self.account)
pending_how_many, timeout, self.account)
local_old_kind = None
for row in rows: # row[0] time, row[1] has kind, row[2] the message
if not row[2]: # message is empty, we don't print it