Software /
code /
prosody-modules
Diff
mod_mam/mod_mam.lua @ 702:d94ee0848b27
mod_mam: Fix issue with get_text() and clean some unneeded variables.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 08 Jun 2012 05:56:24 +0200 |
parent | 701:cc5805f83583 |
child | 705:c9d0ba39a33b |
line wrap: on
line diff
--- a/mod_mam/mod_mam.lua Fri Jun 08 03:13:31 2012 +0200 +++ b/mod_mam/mod_mam.lua Fri Jun 08 05:56:24 2012 +0200 @@ -146,7 +146,6 @@ for i=start,#data do local item = data[i]; local when, with, with_bare = item.when, item.with, item.with_bare; - local ts = item.timestamp; local id = item.id; --module:log("debug", "id is %s", id); @@ -168,7 +167,7 @@ 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 = ts or timestamp(when) }):up(); + :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); @@ -198,7 +197,7 @@ end -- That's all folks! module:log("debug", "Archive query %s completed", tostring(qid)); - origin.send(st.reply(stanza):add_child(rsm.generate{first = { index = index; first }, last = last})); + origin.send(st.reply(stanza):add_child(rsm.generate{last = last})); return true end end);