mod_mam_sql/mod_mam_sql.lua
changeset 1388 6e1facedcb74
parent 1343 7dbde05b48a9
equal deleted inserted replaced
1387:db2ff8f29472 1388:6e1facedcb74
   306 		for item in data:rows() do
   306 		for item in data:rows() do
   307 			local id, when, orig_stanza = unpack(item);
   307 			local id, when, orig_stanza = unpack(item);
   308 			--module:log("debug", "id is %s", id);
   308 			--module:log("debug", "id is %s", id);
   309 
   309 
   310 			local fwd_st = st.message{ to = origin.full_jid }
   310 			local fwd_st = st.message{ to = origin.full_jid }
   311 				:tag("result", { xmlns = xmlns_mam, queryid = qid, id = id }):up()
   311 				:tag("result", { xmlns = xmlns_mam, queryid = qid, id = id })
   312 				:tag("forwarded", { xmlns = xmlns_forward })
   312 				:tag("forwarded", { xmlns = xmlns_forward })
   313 					:tag("delay", { xmlns = xmlns_delay, stamp = timestamp(when) }):up();
   313 					:tag("delay", { xmlns = xmlns_delay, stamp = timestamp(when) }):up();
   314 			orig_stanza = st.deserialize(deserialize(orig_stanza));
   314 			orig_stanza = st.deserialize(deserialize(orig_stanza));
   315 			orig_stanza.attr.xmlns = "jabber:client";
   315 			orig_stanza.attr.xmlns = "jabber:client";
   316 			fwd_st:add_child(orig_stanza);
   316 			fwd_st:add_child(orig_stanza);