Skip to content
Snippets Groups Projects
Commit 06759167 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Only use fallback duplicate search on MAM < 2

parent 6793aa65
No related branches found
No related tags found
No related merge requests found
......@@ -200,13 +200,19 @@ class ConnectionArchive313:
def _nec_mam_decrypted_message_received(self, obj):
if obj.conn.name != self.name:
return
# if self.archiving_namespace != nbxmpp.NS_MAM_2:
# Fallback duplicate search without stanza-id
duplicate = app.logger.search_for_duplicate(
self.name, obj.with_, obj.timestamp, obj.msgtxt)
if duplicate:
# dont propagate the event further
return True
namespace = self.archiving_namespace
if obj.groupchat:
namespace = muc_caps_cache.get_mam_namespace(obj.room_jid)
if namespace != nbxmpp.NS_MAM_2:
# Fallback duplicate search without stanza-id
duplicate = app.logger.search_for_duplicate(
self.name, obj.with_, obj.timestamp, obj.msgtxt)
if duplicate:
# dont propagate the event further
return True
app.logger.insert_into_logs(self.name,
obj.with_,
obj.timestamp,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment