summaryrefslogtreecommitdiff
path: root/plugins/otr.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-04-17 20:39:01 +0200
committermathieui <mathieui@mathieui.net>2014-04-17 20:39:01 +0200
commitdc08adf6055ec231869556bfdaed19151a0f3aed (patch)
tree2fedf1134e97c7c35c7604ae7bce2d5f10f05ede /plugins/otr.py
parent71ae73ca7b37123d741eb065dc26d85d12922c43 (diff)
downloadpoezio-dc08adf6055ec231869556bfdaed19151a0f3aed.tar.gz
poezio-dc08adf6055ec231869556bfdaed19151a0f3aed.tar.bz2
poezio-dc08adf6055ec231869556bfdaed19151a0f3aed.tar.xz
poezio-dc08adf6055ec231869556bfdaed19151a0f3aed.zip
Do not lock on the “composing” chat state with otr
might send too many stanzas when send_chat_states is false, but I don’t care.
Diffstat (limited to 'plugins/otr.py')
-rw-r--r--plugins/otr.py3
1 files changed, 3 insertions, 0 deletions
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,