From 76445a68670b8b1cc9a046d582ddc68982e4c221 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Tue, 20 Sep 2016 15:02:45 +0900 Subject: Add support for XEP-0380: Explicit Message Encryption Both for displaying incoming messages, and sending OTR and legacy OpenPGP. --- plugins/gpg/__init__.py | 1 + plugins/otr.py | 1 + 2 files changed, 2 insertions(+) (limited to 'plugins') diff --git a/plugins/gpg/__init__.py b/plugins/gpg/__init__.py index 128cd1d1..daf76e65 100644 --- a/plugins/gpg/__init__.py +++ b/plugins/gpg/__init__.py @@ -251,6 +251,7 @@ class Plugin(BasePlugin): encrypted_element.text = self.remove_gpg_headers(xml.sax.saxutils.escape(str(text))) message.append(encrypted_element) message['body'] = 'This message has been encrypted using the GPG key with id: %s' % self.keyid + message['eme']['namespace'] = 'jabber:x:encrypted' message.send() del message['body'] tab.add_message(body, nickname=self.core.own_nick, diff --git a/plugins/otr.py b/plugins/otr.py index cffe1797..580a72c4 100644 --- a/plugins/otr.py +++ b/plugins/otr.py @@ -347,6 +347,7 @@ class PoezioContext(Context): message = self.xmpp.make_message(mto=self.peer, mbody=msg.decode('ascii'), mtype='chat') + message['eme']['namespace'] = 'urn:xmpp:otr:0' message.enable('carbon_private') message.enable('no-copy') message.enable('no-permanent-store') -- cgit v1.2.3