comparison mod_audit/mod_audit.lua @ 5763:6c0570a8b866

mod_audit: Fix querying for both user and global events Forgot to fix this before I pushed
author Kim Alvefur <zash@zash.se>
date Sat, 02 Dec 2023 13:35:29 +0100
parents 754f8eaad34c
children
comparison
equal deleted inserted replaced
5762:ff8b6d0b3bfa 5763:6c0570a8b866
205 if jid.node(query_jid) then 205 if jid.node(query_jid) then
206 print("WW: Specifying a user account is incompatible with --global. Showing only global events."); 206 print("WW: Specifying a user account is incompatible with --global. Showing only global events.");
207 end 207 end
208 query_jid = "@"; 208 query_jid = "@";
209 elseif host == query_jid then 209 elseif host == query_jid then
210 query_jid = "@"; 210 query_jid = nil;
211 end 211 end
212 212
213 local results, err = store:find(nil, { 213 local results, err = store:find(nil, {
214 with = query_jid; 214 with = query_jid;
215 limit = arg.limit and tonumber(arg.limit) or nil; 215 limit = arg.limit and tonumber(arg.limit) or nil;