# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1521912454 -3600
# Node ID ced09d7d7c96b419f405e396343bf286f54bc39d
# Parent  cfcc78c509050a6810f14301e464074cd038863c
mod_muc_mam: Save the MUC <x> on recorded join stanzas

diff -r cfcc78c50905 -r ced09d7d7c96 plugins/mod_muc_mam.lua
--- a/plugins/mod_muc_mam.lua	Sat Mar 24 18:16:08 2018 +0100
+++ b/plugins/mod_muc_mam.lua	Sat Mar 24 18:27:34 2018 +0100
@@ -341,7 +341,7 @@
 
 if module:get_option_boolean("muc_log_presences", true) then
 	module:hook("muc-occupant-joined", function (event)
-		save_to_history(event.room, st.stanza("presence", { from = event.nick }));
+		save_to_history(event.room, st.stanza("presence", { from = event.nick }):tag("x", { xmlns = "http://jabber.org/protocol/muc" }));
 	end);
 	module:hook("muc-occupant-left", function (event)
 		save_to_history(event.room, st.stanza("presence", { type = "unavailable", from = event.nick }));