# HG changeset patch # User Thijs Alkemade # Date 1337607362 -7200 # Node ID b42b75f3bda001347eec85c2e44cb44c712206eb # Parent 684cc57a49c11ccaa0cb0a119f551e838bc40194 mod_mam: Add the UID to the when sending an archived message back. diff -r 684cc57a49c1 -r b42b75f3bda0 mod_mam/mod_mam.lua --- a/mod_mam/mod_mam.lua Wed May 16 17:34:47 2012 +0500 +++ b/mod_mam/mod_mam.lua Mon May 21 15:36:02 2012 +0200 @@ -139,6 +139,7 @@ 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", "message with %s at %s", with, when or "???"); -- Apply query filter if (not qwith or ((qwith == with) or (qwith == with_bare))) @@ -147,7 +148,7 @@ -- Optimizable? Do this when archiving? --module:log("debug", "sending"); local fwd_st = st.message{ to = origin.full_jid } - :tag("result", { xmlns = xmlns_mam, queryid = qid }):up() + :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(); local orig_stanza = st.deserialize(item.stanza);