Software /
code /
prosody-modules
Changeset
1114:6c0e1f9926f6
mod_mam: Swap first and last first for a simpler argument to RSM in reverse queries
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 13 Jul 2013 17:00:13 +0200 |
parents | 1113:f1f0c87cffdd |
children | 1115:91d210b6106a |
files | mod_mam/mod_mam.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_mam/mod_mam.lua Fri Jul 12 23:18:30 2013 +0200 +++ b/mod_mam/mod_mam.lua Sat Jul 13 17:00:13 2013 +0200 @@ -213,9 +213,10 @@ -- That's all folks! module:log("debug", "Archive query %s completed", tostring(qid)); + if reverse then first, last = last, first; end return origin.send(st.reply(stanza) :query(xmlns_mam):add_child(rsm.generate { - first = (reverse and last or first), last = (reverse and first or last), count = #data})); + first = first, last = last, count = #data })); end); local function has_in_roster(user, who)