# HG changeset patch # User Kim Alvefur # Date 1632412549 -7200 # Node ID f590e3c51eff2aa0a8a890346c455ff6f893cb83 # Parent c443abff04d80982b6c9857aa2e64a26071c6a97 mod_mam: Merge main and RSM-specific log message here too diff -r c443abff04d8 -r f590e3c51eff plugins/mod_mam/mod_mam.lua --- a/plugins/mod_mam/mod_mam.lua Thu Sep 23 17:50:33 2021 +0200 +++ b/plugins/mod_mam/mod_mam.lua Thu Sep 23 17:55:49 2021 +0200 @@ -143,22 +143,22 @@ qstart, qend = vstart, vend; end - module:log("debug", "Archive query by %s id=%s with=%s when=%s...%s", - origin.username, - qid or stanza.attr.id, - qwith or "*", - qstart and timestamp(qstart) or "", - qend and timestamp(qend) or ""); - -- RSM stuff local qset = rsm.get(query); local qmax = m_min(qset and qset.max or default_max_items, max_max_items); local reverse = qset and qset.before or false; local before, after = qset and qset.before or qbefore, qset and qset.after or qafter; if type(before) ~= "string" then before = nil; end - if qset then - module:log("debug", "Archive query id=%s rsm=%q", qid or stanza.attr.id, qset); - end + + + module:log("debug", "Archive query by %s id=%s with=%s when=%s...%s rsm=%q", + origin.username, + qid or stanza.attr.id, + qwith or "*", + qstart and timestamp(qstart) or "", + qend and timestamp(qend) or "", + qset); + -- A reverse query needs to be flipped local flip = reverse; -- A flip-page query needs to be the opposite of that.