diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-11-26 16:41:48 +0000 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-11-26 16:41:48 +0000 |
commit | 457785b286c31fda28898fb755a1f9ae448da65d (patch) | |
tree | 05255d9c6bcf63c4500e4d901e1546c2f8d92e61 | |
parent | 4847f834bd8f6a1168851b0918c080fc0e6c13b8 (diff) | |
download | slixmpp-457785b286c31fda28898fb755a1f9ae448da65d.tar.gz slixmpp-457785b286c31fda28898fb755a1f9ae448da65d.tar.bz2 slixmpp-457785b286c31fda28898fb755a1f9ae448da65d.tar.xz slixmpp-457785b286c31fda28898fb755a1f9ae448da65d.zip |
XEP-0380: Add a helper to test for the presence of an EME tag.
-rw-r--r-- | slixmpp/plugins/xep_0380/eme.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/slixmpp/plugins/xep_0380/eme.py b/slixmpp/plugins/xep_0380/eme.py index 7ff09f65..abdd3e88 100644 --- a/slixmpp/plugins/xep_0380/eme.py +++ b/slixmpp/plugins/xep_0380/eme.py @@ -55,6 +55,9 @@ class XEP_0380(BasePlugin): def session_bind(self, jid): self.xmpp.plugin['xep_0030'].add_feature(Encryption.namespace) + def has_eme(self, msg): + return msg.xml.find('{%s}encryption' % Encryption.namespace) is not None + def replace_body_with_eme(self, msg): eme = msg['eme'] namespace = eme['namespace'] |