count as pending events message from other resources too. see #2657
This commit is contained in:
parent
2f354b464d
commit
ed5930a1b1
1 changed files with 5 additions and 2 deletions
|
@ -1612,10 +1612,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', '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(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,
|
rows = gajim.logger.get_last_conversation_lines(jid, restore_how_many,
|
||||||
pending_how_many, timeout, self.account)
|
pending_how_many, timeout, self.account)
|
||||||
|
|
Loading…
Add table
Reference in a new issue