aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-04-02 22:44:29 +0200
committerKim Alvefur <zash@zash.se>2023-04-02 22:44:29 +0200
commit56cfc0895210948e802adb4a26d57a013e79242e (patch)
tree7f02d24b4551c7d7e4b88ff27fe2923864e626d4 /plugins
parentd8789a671bdb47e464ccafce990b118b3341e30a (diff)
downloadprosody-56cfc0895210948e802adb4a26d57a013e79242e.tar.gz
prosody-56cfc0895210948e802adb4a26d57a013e79242e.zip
mod_admin_shell: Strip 'prosody:' prefix to allow narrower Role column
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_admin_shell.lua7
1 files changed, 4 insertions, 3 deletions
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;
}
};