comparison mod_mam_muc/mod_mam_muc.lua @ 3364:264eab9d501c

mod_mam_muc: Log to debug log whether a message is archived or not
author Kim Alvefur <zash@zash.se>
date Sun, 28 Oct 2018 19:01:12 +0100
parents f7ebf8fcd602
children
comparison
equal deleted inserted replaced
3363:2681f74750b2 3364:264eab9d501c
405 stored_stanza:add_direct_child(st.stanza("x", { xmlns = xmlns_muc_user }) 405 stored_stanza:add_direct_child(st.stanza("x", { xmlns = xmlns_muc_user })
406 :tag("item", { affiliation = affiliation; role = role; jid = actor })); 406 :tag("item", { affiliation = affiliation; role = role; jid = actor }));
407 end 407 end
408 408
409 -- Policy check 409 -- Policy check
410 if not archiving_enabled(self) then return end -- Don't log 410 if not archiving_enabled(self) then -- Don't log
411 module:log("debug", "Not archiving %s", stanza:top_tag());
412 return;
413 end
414 module:log("debug", "Archiving %s", stanza:top_tag());
411 415
412 -- And stash it 416 -- And stash it
413 local with = stanza.name 417 local with = stanza.name
414 if stanza.attr.type then 418 if stanza.attr.type then
415 with = with .. "<" .. stanza.attr.type 419 with = with .. "<" .. stanza.attr.type