stop sending chatstates when we get an error message from a contact. Fixes #8010

This commit is contained in:
Yann Leboulanger 2015-05-10 20:56:41 +02:00
parent 5978d84615
commit 0fc96927b6
2 changed files with 3 additions and 0 deletions

View File

@ -2746,6 +2746,8 @@ class ChatControl(ChatControlBase):
if not contact.supports(NS_CHATSTATES):
return
if contact.our_chatstate == False:
return
# if the new state we wanna send (state) equals
# the current state (contact.our_chatstate) then return

View File

@ -416,6 +416,7 @@ class Interface:
account=account, name=nick, show=show)
ctrl = self.new_private_chat(gc_c, account, session)
ctrl.contact.our_chatstate = False
ctrl.print_conversation(_('Error %(code)s: %(msg)s') % {
'code': obj.error_code, 'msg': obj.error_msg}, 'status')
return