From e24d4f8caf54810212f4c25b83310d5c75c6da34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Tue, 1 Aug 2017 20:25:33 +0200 Subject: [PATCH] Fix receiving MAM Messages from ourself This is a regression from the refactoring --- gajim/common/connection_handlers_events.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gajim/common/connection_handlers_events.py b/gajim/common/connection_handlers_events.py index 6067505df..a5425d35e 100644 --- a/gajim/common/connection_handlers_events.py +++ b/gajim/common/connection_handlers_events.py @@ -1051,7 +1051,11 @@ class MamMessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent): self.query_id = self.result.getAttr('queryid') frm = self.msg_.getFrom() + # Some servers dont set the 'to' attribute when + # we send a message to ourself to = self.msg_.getTo() + if to is None: + to = own_jid if frm.bareMatch(own_jid): self.stanza_id = self.msg_.getOriginID()