Skip to content
Snippets Groups Projects
Commit ed5930a1 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

count as pending events message from other resources too. see #2657

parent 2f354b46
No related branches found
No related tags found
No related merge requests found
......@@ -1612,10 +1612,13 @@ def restore_conversation(self):
return
timeout = gajim.config.get('restore_timeout') # in minutes
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)
pending_how_many = len(gajim.events.get_events(self.account, jid,
['chat', 'pm']))
if self.resource:
pending_how_many += len(gajim.events.get_events(self.account,
self.contact.get_full_jid(), ['chat', 'pm']))
rows = gajim.logger.get_last_conversation_lines(jid, restore_how_many,
pending_how_many, timeout, self.account)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment