# HG changeset patch # User Kim Alvefur # Date 1339179099 -7200 # Node ID c9d0ba39a33bd990a1e255304d9ccbf64280452b # Parent 57206f8f7b0954fff444b9dc6197a8e4fbda82af mod_mam: Move RSM pointer to last message into a MAM-namespaced child diff -r 57206f8f7b09 -r c9d0ba39a33b mod_mam/mod_mam.lua --- a/mod_mam/mod_mam.lua Fri Jun 08 19:52:36 2012 +0200 +++ b/mod_mam/mod_mam.lua Fri Jun 08 20:11:39 2012 +0200 @@ -197,7 +197,13 @@ end -- That's all folks! module:log("debug", "Archive query %s completed", tostring(qid)); - origin.send(st.reply(stanza):add_child(rsm.generate{last = last})); + + local reply = st.reply(stanza); + if last then + -- This is a bit redundant, isn't it? + reply:query(xmlns_mam):add_child(rsm.generate{last = last}); + end + origin.send(reply); return true end end);