plugins/mod_muc_mam.lua
branch0.11
changeset 9846 6f39be2e0be5
parent 9845 a44f562e01a5
child 9847 17060708d0eb
equal deleted inserted replaced
9845:a44f562e01a5 9846:6f39be2e0be5
   339 	end
   339 	end
   340 
   340 
   341 	-- Policy check
   341 	-- Policy check
   342 	if not archiving_enabled(self) then return end -- Don't log
   342 	if not archiving_enabled(self) then return end -- Don't log
   343 
   343 
   344 	-- And stash it
       
   345 	local with = stanza.name
   344 	local with = stanza.name
   346 	if stanza.attr.type then
   345 	if stanza.attr.type then
   347 		with = with .. "<" .. stanza.attr.type
   346 		with = with .. "<" .. stanza.attr.type
   348 	end
   347 	end
   349 
   348 
       
   349 	-- And stash it
   350 	local id = archive:append(room_node, nil, stored_stanza, time_now(), with);
   350 	local id = archive:append(room_node, nil, stored_stanza, time_now(), with);
   351 
   351 
   352 	if id then
   352 	if id then
   353 		stanza:add_direct_child(st.stanza("stanza-id", { xmlns = xmlns_st_id, by = self.jid, id = id }));
   353 		stanza:add_direct_child(st.stanza("stanza-id", { xmlns = xmlns_st_id, by = self.jid, id = id }));
   354 	end
   354 	end