diff src/plugins/plugin_xep_0249.py @ 2138:6e509ee853a8

plugin OTR, core; use of new sendMessage + OTR mini refactoring: - new client.sendMessage method is used instead of sendMessageToStream - client.feedback is used in OTR - OTR now add message processing hints and carbon private element as recommanded by XEP-0364. Explicit Message Encryption is still TODO - OTR use the new sendMessageFinish trigger, this has a number of advantages: * there is little risk that OTR is skipped by other plugins (they have to use client.sendMessage as recommanded) * being at the end of the chain, OTR can check and remove any HTML or other leaking elements * OTR doesn't have to skip other plugins anymore, this means that things like delivery receipts are now working with OTR (but because there is not full stanza encryption, they can leak metadata) * OTR can decide to follow storage hint by letting or deleting "history" key
author Goffi <goffi@goffi.org>
date Sun, 05 Feb 2017 15:00:01 +0100
parents 6a66c8c5a567
children 1d3f73e065e1
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0249.py	Sun Feb 05 14:55:56 2017 +0100
+++ b/src/plugins/plugin_xep_0249.py	Sun Feb 05 15:00:01 2017 +0100
@@ -119,6 +119,7 @@
                 log.warning(u"Ignoring invalid invite option: {}".format(key))
                 continue
             x_elt[key] = value
+        # there is not body in this message, so we can use directly send()
         client.send(message)
 
     def _accept(self, room_jid, profile_key=C.PROF_KEY_NONE):