From 12e1c0374cd71ef262b3dceb48650ea70fd8b816 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Tue, 2 Jul 2019 00:55:41 +0200 Subject: poezio/plugin_e2ee: Add TODO in decryption method to match more than EME messages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- poezio/plugin_e2ee.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'poezio/plugin_e2ee.py') diff --git a/poezio/plugin_e2ee.py b/poezio/plugin_e2ee.py index 75508bc9..8b103cb2 100644 --- a/poezio/plugin_e2ee.py +++ b/poezio/plugin_e2ee.py @@ -179,6 +179,11 @@ class E2EEPlugin(BasePlugin): return jid in self._enabled_tabs and self._enabled_tabs[jid] == self.encrypt def _decrypt(self, message: Message, tab: ChatTabs) -> None: + + # TODO: Not all encrypted messages will contain EME. EME is typically + # used only when a message contains ``. Find a way to have the + # plugin register an element/ns to check for etc. + if message.xml.find('{%s}%s' % (EME_NS, EME_TAG)) is None: return None -- cgit v1.2.3