Commit a0140388 authored by Maxime Buquet's avatar Maxime Buquet
Browse files

e2ee api: Avoid creating EME tag when looking if it's present

Some slixmpp API fail.. it's be great if we didn't have to fiddle with
the xml lib directly
Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <>
parent 47909c4d
......@@ -26,6 +26,9 @@ ChatTabs = Union[
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:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment