From 217185d0746f390a1dfc863eb73f7d76492a2e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Mon, 18 Nov 2019 20:16:59 +0100 Subject: [PATCH] [omemo] Correctly handle presence without real jid --- omemo/modules/omemo.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/omemo/modules/omemo.py b/omemo/modules/omemo.py index f88a1cd..c2b2ce6 100644 --- a/omemo/modules/omemo.py +++ b/omemo/modules/omemo.py @@ -297,12 +297,11 @@ class OMEMO(BaseModule): room = properties.jid.getBare() - jid = properties.muc_user.jid - if jid is None: + if properties.muc_user is None or properties.muc_user.jid is None: # No real jid found return - jid = jid.getBare() + jid = properties.muc_user.jid.getBare() if properties.muc_user.affiliation in (Affiliation.OUTCAST, Affiliation.NONE): self.backend.remove_muc_member(room, jid)