Fix #1998, #2439 (reset chat state status)

This commit is contained in:
mathieui 2014-04-02 21:53:12 +02:00
parent c9069ce623
commit ace9fc6661
3 changed files with 6 additions and 0 deletions

View file

@ -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):
"""

View file

@ -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

View file

@ -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)