# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1495285250 -7200
# Node ID 4720f5ec4171cc456894f0e1e350be4025af1189
# Parent  472219f85df6e7cb5c413490fd998a3c78a0384d# Parent  1dc6efcc420a2b5ebeaee41acd0016e3a7085aee
Merge 0.10->trunk

diff -r 472219f85df6 -r 4720f5ec4171 plugins/mod_mam/mod_mam.lua
--- a/plugins/mod_mam/mod_mam.lua	Thu May 18 02:01:20 2017 +0200
+++ b/plugins/mod_mam/mod_mam.lua	Sat May 20 15:00:50 2017 +0200
@@ -290,7 +290,7 @@
 		local ok = archive:append(store_user, nil, stanza, time_now(), with);
 		if ok then
 			local id = ok;
-			stanza:tag("stanza-id", { xmlns = xmlns_st_id, by = store_user.."@"..host, id = id }):up();
+			event.stanza:tag("stanza-id", { xmlns = xmlns_st_id, by = store_user.."@"..host, id = id }):up();
 			if cleanup then cleanup[store_user] = true; end
 			module:fire_event("archive-message-added", { origin = origin, stanza = stanza, for_user = store_user, id = id });
 		end