Fix receiving MAM Messages from ourself

This is a regression from the refactoring
This commit is contained in:
Philipp Hörist 2017-08-01 20:25:33 +02:00
parent 1f5e927ca6
commit e24d4f8caf
1 changed files with 4 additions and 0 deletions

View File

@ -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()