Comparison

plugins/mod_mam/mod_mam.lua @ 10077:c0702a1534cb

mod_mam: Log RSM parameters Helps when trying to figure out why some queries fail, ie when paging using an archive id that doesn't exist.
author Kim Alvefur <zash@zash.se>
date Thu, 11 Jul 2019 23:27:45 +0200
parent 10076:ee85cea08127
child 10078:44371850c6b0
comparison
equal deleted inserted replaced
10076:ee85cea08127 10077:c0702a1534cb
129 local qset = rsm.get(query); 129 local qset = rsm.get(query);
130 local qmax = m_min(qset and qset.max or default_max_items, max_max_items); 130 local qmax = m_min(qset and qset.max or default_max_items, max_max_items);
131 local reverse = qset and qset.before or false; 131 local reverse = qset and qset.before or false;
132 local before, after = qset and qset.before, qset and qset.after; 132 local before, after = qset and qset.before, qset and qset.after;
133 if type(before) ~= "string" then before = nil; end 133 if type(before) ~= "string" then before = nil; end
134 if qset then
135 module:log("debug", "Archive query id=%s rsm=%q", qid or stanza.attr.id, qset);
136 end
134 137
135 -- Load all the data! 138 -- Load all the data!
136 local data, err = archive:find(origin.username, { 139 local data, err = archive:find(origin.username, {
137 start = qstart; ["end"] = qend; -- Time range 140 start = qstart; ["end"] = qend; -- Time range
138 with = qwith; 141 with = qwith;