Merge branch 'eme-add-method' into 'master'
xep_0380: Add add_eme method See merge request poezio/slixmpp!11
This commit is contained in:
commit
628b357b06
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