From fe1f2c010383e10496bde4eebc2195557eb2858b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Wed, 26 Jul 2017 09:46:34 +0200 Subject: [PATCH] Dont drop MAM Message on missing stanza-id A missing stanza ID means, we will have to take some measures to make sure we get no duplicates in the Database later on. Also fix getting the origin-id. Third time is a charm. --- gajim/common/connection_handlers_events.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gajim/common/connection_handlers_events.py b/gajim/common/connection_handlers_events.py index 73e09a1c6..ec68749c5 100644 --- a/gajim/common/connection_handlers_events.py +++ b/gajim/common/connection_handlers_events.py @@ -1078,7 +1078,7 @@ class MamMessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent): self.stanza_id = self.msg_.getTag('origin-id', namespace=nbxmpp.NS_SID) if self.stanza_id: - self.stanza_id.getID() + self.stanza_id = self.stanza_id.getID() else: self.stanza_id = self.msg_.getID() @@ -1096,8 +1096,7 @@ class MamMessageReceivedEvent(nec.NetworkIncomingEvent, HelperEvent): self.resource = frm.getResource() if not self.stanza_id: - log.error('Could not retrieve stanza-id') - return False + log.debug('Could not retrieve stanza-id') # Use timestamp provided by archive, # Fallback: Use timestamp provided by user and issue a warning