From 6f50f5dee7530ae4c7e64605deb20e6789dc3abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Mon, 14 May 2018 12:24:13 +0200 Subject: [PATCH] xep_0384: is_encrypted helper --- plugin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin.py b/plugin.py index 1268ede..f4557d0 100644 --- a/plugin.py +++ b/plugin.py @@ -162,4 +162,8 @@ class XEP_0384(BasePlugin): jid, OMEMO_DEVICES_NS, payload=payload, ) + def is_encrypted(self, msg): + return msg.xml.find('{%s}encrypted' % OMEMO_BASE_NS) is not None + + register_plugin(XEP_0384)