diff options
author | Nikolay Yakimov <root@livid.pp.ru> | 2017-01-23 19:03:43 +0300 |
---|---|---|
committer | Nikolay Yakimov <root@livid.pp.ru> | 2017-01-23 19:03:43 +0300 |
commit | 97dd0ebea0b5baad378814fbb78188c37e0bd0fe (patch) | |
tree | e09c284e1ddc451fb7591a51b0833f6f69ce67a2 | |
parent | a274de421fba58ffac933d27d02afd9d5f08823b (diff) |
[gotr] Set appdata in handle_outgoing_msg_stanza
-rw-r--r-- | gotr/otrmodule.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gotr/otrmodule.py b/gotr/otrmodule.py index 6cba694..175f166 100644 --- a/gotr/otrmodule.py +++ b/gotr/otrmodule.py @@ -614,12 +614,14 @@ class OtrPlugin(GajimPlugin): xhtml = event.msg_iq.getXHTML() body = event.msg_iq.getBody() encrypted = False + thread_id = event.msg_iq.getThread() try: if xhtml: xhtml = xhtml.encode('utf8') encrypted_msg = self.us[event.conn.name].\ getContext(event.msg_iq.getTo()).\ - sendMessage(potr.context.FRAGMENT_SEND_ALL_BUT_LAST, xhtml) + sendMessage(potr.context.FRAGMENT_SEND_ALL_BUT_LAST, xhtml, + appdata={'thread': thread_id}) if xhtml != encrypted_msg.strip(): #.strip() because sendMessage() adds whitespaces encrypted = True event.msg_iq.delChild('html') @@ -628,7 +630,8 @@ class OtrPlugin(GajimPlugin): body = escape(body).encode('utf8') encrypted_msg = self.us[event.conn.name].\ getContext(event.msg_iq.getTo()).\ - sendMessage(potr.context.FRAGMENT_SEND_ALL_BUT_LAST, body) + sendMessage(potr.context.FRAGMENT_SEND_ALL_BUT_LAST, body, + appdata={'thread': thread_id}) if body != encrypted_msg.strip(): encrypted = True event.msg_iq.setBody(encrypted_msg) |