mod_mam: Stamp <archived> on incoming stanzas after archiving them
authorKim Alvefur <zash@zash.se>
Sun, 30 Jun 2013 00:40:37 +0200
changeset 1094 158680bff642
parent 1093 959e38a41a2e
child 1095 cb21928bca1d
mod_mam: Stamp <archived> on incoming stanzas after archiving them
mod_mam/mod_mam.lua
--- a/mod_mam/mod_mam.lua	Sun Jun 30 00:40:04 2013 +0200
+++ b/mod_mam/mod_mam.lua	Sun Jun 30 00:40:37 2013 +0200
@@ -311,11 +311,9 @@
 			resource = target_resource,
 			stanza = st.preserialize(stanza)
 		});
-		--[[ This was dropped from the spec
-		if ok then 
-			stanza:tag("archived", { xmlns = xmlns_mam, by = host, id = id }):up();
+		if ok and not c2s then
+			stanza:tag("archived", { xmlns = xmlns_mam, by = jid_bare(orig_to), id = id }):up();
 		end
-		--]]
 	else
 		module:log("debug", "Not archiving stanza: %s", stanza:top_tag());
 	end