From ace9fc6661d1d440d5c7a37553c4dff9fb525541 Mon Sep 17 00:00:00 2001 From: mathieui Date: Wed, 2 Apr 2014 21:53:12 +0200 Subject: Fix #1998, #2439 (reset chat state status) --- src/core.py | 4 ++++ src/tabs/conversationtab.py | 1 + src/tabs/privatetab.py | 1 + 3 files changed, 6 insertions(+) diff --git a/src/core.py b/src/core.py index ac0c1722..b7f6ea17 100644 --- a/src/core.py +++ b/src/core.py @@ -3494,6 +3494,10 @@ class Core(object): return roster.modified() contact.error = presence['error']['type'] + ': ' + presence['error']['condition'] + # reset chat states status on presence error + tab = self.get_tab_by_name(jid.full, tabs.ConversationTab) + if tab: + tab.remote_wants_chatstates = None def on_got_offline(self, presence): """ diff --git a/src/tabs/conversationtab.py b/src/tabs/conversationtab.py index f999ddcd..ce60689c 100644 --- a/src/tabs/conversationtab.py +++ b/src/tabs/conversationtab.py @@ -406,6 +406,7 @@ class DynamicConversationTab(ConversationTab): Unlock the tab from a resource. It is now “associated” with the bare jid. """ + self.remote_wants_chatstates = None if self.locked_resource != None: self.locked_resource = None diff --git a/src/tabs/privatetab.py b/src/tabs/privatetab.py index 5599ec45..5b9d1cee 100644 --- a/src/tabs/privatetab.py +++ b/src/tabs/privatetab.py @@ -357,6 +357,7 @@ class PrivateTab(ChatTab): def deactivate(self, reason=None): self.on = False + self.remote_wants_chatstates = None if reason: self.add_message(txt=reason, typ=2) -- cgit v1.2.3