From 56cfc0895210948e802adb4a26d57a013e79242e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 2 Apr 2023 22:44:29 +0200 Subject: mod_admin_shell: Strip 'prosody:' prefix to allow narrower Role column --- plugins/mod_admin_shell.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua index 5c9d3df7..3a2a346e 100644 --- a/plugins/mod_admin_shell.lua +++ b/plugins/mod_admin_shell.lua @@ -966,11 +966,12 @@ available_columns = { }; role = { title = "Role"; - description = "Session role"; - width = 20; + description = "Session role with 'prosody:' prefix removed"; + width = #"admin"; key = "role"; mapper = function(role) - return role and role.name; + local name = role and role.name; + return name and name:match"^prosody:(%w+)" or name; end; } }; -- cgit v1.2.3