From dc08adf6055ec231869556bfdaed19151a0f3aed Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 17 Apr 2014 20:39:01 +0200 Subject: =?UTF-8?q?Do=20not=20lock=20on=20the=20=E2=80=9Ccomposing?= =?UTF-8?q?=E2=80=9D=20chat=20state=20with=20otr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit might send too many stanzas when send_chat_states is false, but I don’t care. --- plugins/otr.py | 3 +++ src/tabs/basetabs.py | 1 + 2 files changed, 4 insertions(+) diff --git a/plugins/otr.py b/plugins/otr.py index 9d19e1ee..3f22687f 100644 --- a/plugins/otr.py +++ b/plugins/otr.py @@ -482,6 +482,9 @@ class Plugin(BasePlugin): ctx = self.contexts.get(name) if ctx and ctx.state == STATE_ENCRYPTED: ctx.sendMessage(0, msg['body'].encode('utf-8')) + if not tab.send_chat_state('active'): + tab.send_chat_state('inactive', always_send=True) + tab.add_message(msg['body'], nickname=self.core.own_nick or tab.own_nick, nick_color=theming.get_theme().COLOR_OWN_NICK, diff --git a/src/tabs/basetabs.py b/src/tabs/basetabs.py index 94b38062..a7a16960 100644 --- a/src/tabs/basetabs.py +++ b/src/tabs/basetabs.py @@ -583,6 +583,7 @@ class ChatTab(Tab): msg['chat_state'] = state self.chat_state = state msg.send() + return True def send_composing_chat_state(self, empty_after): """ -- cgit v1.2.3