[omemo] Correctly handle MAM Messages without real jid

Fixes #457
This commit is contained in:
Philipp Hörist
2019-11-09 10:59:45 +01:00
parent 873d7f323d
commit 147ab8d83c

View File

@@ -273,8 +273,9 @@ class OMEMO(BaseModule):
self._log.info('Message received, archive: %s', properties.mam.archive)
if properties.from_muc:
self._log.info('MUC MAM Message received')
if properties.muc_user.jid is None:
self._log.info('No real jid found')
if properties.muc_user is None or properties.muc_user.jid is None:
self._log.warning('Received MAM Message which can '
'not be mapped to a real jid')
return
return properties.muc_user.jid.getBare()
return properties.from_.getBare()