xep_0380: Add add_eme method
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
e9f2f503b8
commit
88260cc240
1 changed files with 5 additions and 0 deletions
|
@ -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']
|
||||
|
|
Loading…
Reference in a new issue