Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2006-11-11 17:47:08 +0300
committerYann Leboulanger <asterix@lagaule.org>2006-11-11 17:47:08 +0300
commited5930a1b18791087057b856efacb4c2626e9b7d (patch)
tree603d77e9a5215f861fb016306af499950e243898
parent2f354b464db06ecf4d86789ff115a4c21137f16e (diff)
count as pending events message from other resources too. see #2657
-rw-r--r--src/chat_control.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/chat_control.py b/src/chat_control.py
index 80c7925a4..7a0a9effc 100644
--- a/src/chat_control.py
+++ b/src/chat_control.py
@@ -1612,10 +1612,13 @@ class ChatControl(ChatControlBase):
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)