diff mod_mam_muc/mod_mam_muc.lua @ 2507:b8a66805459e

mod_mam_muc: Update to XEP-0313 0.5.1
author Kim Alvefur <zash@zash.se>
date Mon, 20 Feb 2017 00:05:14 +0100
parents f576ac1cad65
children 17883c405df3
line wrap: on
line diff
--- a/mod_mam_muc/mod_mam_muc.lua	Mon Feb 20 00:41:13 2017 +0100
+++ b/mod_mam_muc/mod_mam_muc.lua	Mon Feb 20 00:05:14 2017 +0100
@@ -8,7 +8,7 @@
 	return;
 end
 
-local xmlns_mam     = "urn:xmpp:mam:0";
+local xmlns_mam     = "urn:xmpp:mam:1";
 local xmlns_delay   = "urn:xmpp:delay";
 local xmlns_forward = "urn:xmpp:forward:0";
 local muc_form_enable_logging = "muc#roomconfig_enablelogging"
@@ -219,7 +219,6 @@
 	end
 	local total = tonumber(err);
 
-	origin.send(st.reply(stanza))
 	local msg_reply_attr = { to = stanza.attr.from, from = stanza.attr.to };
 
 	local results = {};
@@ -265,7 +264,7 @@
 	-- That's all folks!
 	module:log("debug", "Archive query %s completed", tostring(qid));
 
-	origin.send(st.message(msg_reply_attr)
+	origin.send(st.reply(stanza)
 		:tag("fin", { xmlns = xmlns_mam, queryid = qid, complete = complete })
 			:add_child(rsm.generate {
 				first = first, last = last, count = total }));