Unverified Commit 88260cc2 authored by Maxime Buquet's avatar Maxime Buquet
Browse files

xep_0380: Add add_eme method



Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <pep@bouah.net>
parent e9f2f503
......@@ -55,6 +55,11 @@ class XEP_0380(BasePlugin):
def has_eme(self, msg):
return msg.xml.find('{%s}encryption' % Encryption.namespace) is not None
def add_eme(self, msg: Message, namespace: str) -> Message:
msg['eme']['name'] = self.mechanisms[namespace]
msg['eme']['namespace'] = namespace
return msg
def replace_body_with_eme(self, msg):
eme = msg['eme']
namespace = eme['namespace']
......
Supports Markdown
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