don't show pm event twice when we restore conversation. fixes #2621
This commit is contained in:
parent
6466c45d74
commit
f0f5243e32
|
@ -1609,13 +1609,13 @@ class ChatControl(ChatControlBase):
|
||||||
return
|
return
|
||||||
timeout = gajim.config.get('restore_timeout') # in minutes
|
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
|
# number of messages that are in queue and are already logged, we want
|
||||||
# to avoid duplication
|
# to avoid duplication
|
||||||
pending_how_many = len(events)
|
pending_how_many = len(events)
|
||||||
|
|
||||||
rows = gajim.logger.get_last_conversation_lines(jid, restore_how_many,
|
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
|
local_old_kind = None
|
||||||
for row in rows: # row[0] time, row[1] has kind, row[2] the message
|
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
|
if not row[2]: # message is empty, we don't print it
|
||||||
|
|
Loading…
Reference in New Issue