diff options
-rw-r--r-- | poezio/plugin_e2ee.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/poezio/plugin_e2ee.py b/poezio/plugin_e2ee.py index c94f5ede..0a1080f2 100644 --- a/poezio/plugin_e2ee.py +++ b/poezio/plugin_e2ee.py @@ -26,6 +26,9 @@ ChatTabs = Union[ PrivateTab, ] +EME_NS = 'urn:xmpp:eme:0' +EME_TAG = 'encryption' + class E2EEPlugin(BasePlugin): """Interface for E2EE plugins""" @@ -118,7 +121,7 @@ class E2EEPlugin(BasePlugin): ) def _decrypt(self, message: Message, tab: ChatTabs) -> None: - if message['eme'] is None: + if message.xml.find('{%s}%s' % (EME_NS, EME_TAG)) is None: return None if message['eme']['namespace'] != self.eme_ns: |