is_encrypted: now a staticmethod

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-03-24 19:52:33 +01:00
parent f4d2412443
commit 4bfeb6b002

View file

@ -641,8 +641,8 @@ class XEP_0384(BasePlugin):
return await self._omemo().getTrustForJID(jid.bare) return await self._omemo().getTrustForJID(jid.bare)
@classmethod @staticmethod
def is_encrypted(cls, msg: Message) -> bool: def is_encrypted(msg: Message) -> bool:
return msg.xml.find('{%s}encrypted' % OMEMO_BASE_NS) is not None return msg.xml.find('{%s}encrypted' % OMEMO_BASE_NS) is not None
async def decrypt_message( async def decrypt_message(