Changeset

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 1092:f46307e8e2f8
children 1094:158680bff642
files mod_mam/mod_mam.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
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);