Software /
code /
prosody
Diff
plugins/mod_admin_shell.lua @ 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 |
parent | 13013:430333198e4c |
child | 13035:93c1590b5951 |
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; } };