diff mod_mam/mod_mam.lua @ 1093:959e38a41a2e

mod_mam: The forwarded message should be a child of the MAM result element
author Kim Alvefur <zash@zash.se>
date Sun, 30 Jun 2013 00:40:04 +0200
parents ce8bb0386d08
children 158680bff642
line wrap: on
line diff
--- a/mod_mam/mod_mam.lua	Sun Jun 30 00:18:55 2013 +0200
+++ b/mod_mam/mod_mam.lua	Sun Jun 30 00:40:04 2013 +0200
@@ -193,9 +193,9 @@
 					and (not qend or when <= qend)
 					and (not qset or qset_matches) then
 				local fwd_st = st.message{ to = origin.full_jid }
-					:tag("result", { xmlns = xmlns_mam, queryid = qid, id = id }):up()
-					:tag("forwarded", { xmlns = xmlns_forward })
-						:tag("delay", { xmlns = xmlns_delay, stamp = timestamp(when) }):up();
+					:tag("result", { xmlns = xmlns_mam, queryid = qid, id = id })
+						:tag("forwarded", { xmlns = xmlns_forward })
+							:tag("delay", { xmlns = xmlns_delay, stamp = timestamp(when) }):up();
 				local orig_stanza = st.deserialize(item.stanza);
 				orig_stanza.attr.xmlns = "jabber:client";
 				fwd_st:add_child(orig_stanza);