aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-03-31 22:01:27 +0200
committerKim Alvefur <zash@zash.se>2023-03-31 22:01:27 +0200
commit13084baa387df6f72aa5088e8f3b98aac869ff23 (patch)
treec37b691cecef0c192a3e266d8b493c06c47dd318 /plugins
parent11ada4e3396b9fdcce0d79c71ec5f4888e5a0e9d (diff)
downloadprosody-13084baa387df6f72aa5088e8f3b98aac869ff23.tar.gz
prosody-13084baa387df6f72aa5088e8f3b98aac869ff23.zip
mod_admin_shell: Allow matching on host or bare JID in c2s:show
Only supporting exact match on full JID isn't helpful if you want to list sessions per host or user.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_admin_shell.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua
index 9268b372..5c9d3df7 100644
--- a/plugins/mod_admin_shell.lua
+++ b/plugins/mod_admin_shell.lua
@@ -25,7 +25,7 @@ local prosody = _G.prosody;
local unpack = table.unpack;
local iterators = require "prosody.util.iterators";
local keys, values = iterators.keys, iterators.values;
-local jid_bare, jid_split, jid_join, jid_resource = import("prosody.util.jid", "bare", "prepped_split", "join", "resource");
+local jid_bare, jid_split, jid_join, jid_resource, jid_compare = import("prosody.util.jid", "bare", "prepped_split", "join", "resource", "compare");
local set, array = require "prosody.util.set", require "prosody.util.array";
local cert_verify_identity = require "prosody.util.x509".verify_identity;
local envload = require "prosody.util.envload".envload;
@@ -998,7 +998,7 @@ function def_env.c2s:show(match_jid, colspec)
local function match(session)
local jid = get_jid(session)
- return (not match_jid) or jid == match_jid;
+ return (not match_jid) or jid_compare(jid, match_jid);
end
local group_by_host = true;