# HG changeset patch # User Kim Alvefur # Date 1398856928 -7200 # Node ID 6b3db167374ad19ede64dea1342efe4fa066d4d9 # Parent 57ee26681561b8f8e436b35046925535811865b8 mod_mam: Mirror to and from attributes from iq on result messages diff -r 57ee26681561 -r 6b3db167374a mod_mam/mod_mam.lua --- a/mod_mam/mod_mam.lua Wed Apr 30 13:19:47 2014 +0200 +++ b/mod_mam/mod_mam.lua Wed Apr 30 13:22:08 2014 +0200 @@ -115,10 +115,12 @@ end local count = err; + local msg_reply_attr = { to = stanza.attr.from, from = stanza.attr.to }; + -- Wrap it in stuff and deliver - local first, last; + local fwd_st, first, last; for id, item, when in data do - local fwd_st = st.message{ to = origin.full_jid } + fwd_st = st.message(msg_reply_attr) :tag("result", { xmlns = xmlns_mam, queryid = qid, id = id }) :tag("forwarded", { xmlns = xmlns_forward }) :tag("delay", { xmlns = xmlns_delay, stamp = timestamp(when) }):up();