changeset 09e725f382f9 in /home/hg/repos/gajim

author: Yann Leboulanger <aste...@lagaule.org>
branches: 
details:http://hg.gajim.org/gajim?cmd=changeset;node=09e725f382f9
description: stop sending chatstates when we get an error message from a 
contact. Fixes #8010

diffstat:

 src/chat_control.py  |  2 ++
 src/gui_interface.py |  1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diffs (23 lines):

diff -r f036110b4740 -r 09e725f382f9 src/chat_control.py
--- a/src/chat_control.py       Sun May 10 20:54:26 2015 +0200
+++ b/src/chat_control.py       Sun May 10 20:56:41 2015 +0200
@@ -2746,6 +2746,8 @@
 
         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
diff -r f036110b4740 -r 09e725f382f9 src/gui_interface.py
--- a/src/gui_interface.py      Sun May 10 20:54:26 2015 +0200
+++ b/src/gui_interface.py      Sun May 10 20:56:41 2015 +0200
@@ -416,6 +416,7 @@
                         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
_______________________________________________
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to