Mercurial > prosody-modules
changeset 1403:6b3db167374a
mod_mam: Mirror to and from attributes from iq on result messages
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 30 Apr 2014 13:22:08 +0200 (2014-04-30) |
parents | 57ee26681561 |
children | 99cb06b31ae8 |
files | mod_mam/mod_mam.lua |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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();