diff options
author | Kim Alvefur <zash@zash.se> | 2021-09-23 15:53:39 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-09-23 15:53:39 +0200 |
commit | f958af4a1122b4ca6ac86525fb87a8588b07d47b (patch) | |
tree | b2b68467fc7afcefa5dc1fe92ad2fbae45cde454 | |
parent | 0a8a04dcb1d19c39d8cd65f7541ba5a3e5d682c5 (diff) | |
download | prosody-f958af4a1122b4ca6ac86525fb87a8588b07d47b.tar.gz prosody-f958af4a1122b4ca6ac86525fb87a8588b07d47b.zip |
mod_muc_mam: Merge main and RSM-specific log message into a single one
-rw-r--r-- | plugins/mod_muc_mam.lua | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/mod_muc_mam.lua b/plugins/mod_muc_mam.lua index e509017c..653079b5 100644 --- a/plugins/mod_muc_mam.lua +++ b/plugins/mod_muc_mam.lua @@ -175,12 +175,6 @@ module:hook("iq-set/bare/"..xmlns_mam..":query", function(event) qstart, qend = vstart, vend; end - module:log("debug", "Archive query by %s id=%s when=%s...%s", - from, - qid or stanza.attr.id, - 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); @@ -188,14 +182,18 @@ module:hook("iq-set/bare/"..xmlns_mam..":query", function(event) 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 -- A reverse query needs to be flipped local flip = reverse; -- A flip-page query needs to be the opposite of that. if query:get_child("flip-page") then flip = not flip end + module:log("debug", "Archive query by %s id=%s when=%s...%s rsm=%q", + from, + qid or stanza.attr.id, + qstart and timestamp(qstart) or "", + qend and timestamp(qend) or "", + qset); + -- Load all the data! local data, err = archive:find(room_node, { start = qstart; ["end"] = qend; -- Time range |