comparison 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
comparison
equal deleted inserted replaced
2137:410e7a940a8b 2138:6e509ee853a8
117 for key, value in options.iteritems(): 117 for key, value in options.iteritems():
118 if key not in ('password', 'reason', 'thread'): 118 if key not in ('password', 'reason', 'thread'):
119 log.warning(u"Ignoring invalid invite option: {}".format(key)) 119 log.warning(u"Ignoring invalid invite option: {}".format(key))
120 continue 120 continue
121 x_elt[key] = value 121 x_elt[key] = value
122 # there is not body in this message, so we can use directly send()
122 client.send(message) 123 client.send(message)
123 124
124 def _accept(self, room_jid, profile_key=C.PROF_KEY_NONE): 125 def _accept(self, room_jid, profile_key=C.PROF_KEY_NONE):
125 """Accept the invitation to join a MUC. 126 """Accept the invitation to join a MUC.
126 127