diff options
-rw-r--r-- | slixmpp/plugins/xep_0380/eme.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/slixmpp/plugins/xep_0380/eme.py b/slixmpp/plugins/xep_0380/eme.py index 1cc61d8d..65d585b3 100644 --- a/slixmpp/plugins/xep_0380/eme.py +++ b/slixmpp/plugins/xep_0380/eme.py @@ -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'] |