Software /
code /
prosody
Changeset
13034:1387888a5596
mod_admin_shell: Strip 'prosody:' prefix to allow narrower Role column
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 02 Apr 2023 22:44:29 +0200 |
parents | 13033:a863e4237b91 |
children | 13035:93c1590b5951 |
files | plugins/mod_admin_shell.lua |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_shell.lua Thu Apr 06 16:30:26 2023 +0200 +++ b/plugins/mod_admin_shell.lua Sun Apr 02 22:44:29 2023 +0200 @@ -966,11 +966,12 @@ }; 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; } };