# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1589224442 -7200
# Node ID c6e852984d48c07820eb9aa8586864b637b90f94
# Parent  b4c2c7fae7c05cae18330e1d00eb4c2225ebea61
mod_muc_mam: Remove spoofed archive IDs before archiving, fix #1552

The stanza-id added during archiving looks exactly like what should be
stripped, so the stripping must happen before archiving.

Getting priorities right is hard!

Also no test coverage yet.

diff -r b4c2c7fae7c0 -r c6e852984d48 plugins/mod_muc_mam.lua
--- a/plugins/mod_muc_mam.lua	Fri May 08 23:47:48 2020 +0200
+++ b/plugins/mod_muc_mam.lua	Mon May 11 21:14:02 2020 +0200
@@ -324,7 +324,7 @@
 		return tag;
 	end);
 
-end, 0);
+end, 1);
 
 -- Handle messages
 local function save_to_history(self, stanza)