Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
13033:a863e4237b91 | 13034:1387888a5596 |
---|---|
964 end | 964 end |
965 end | 965 end |
966 }; | 966 }; |
967 role = { | 967 role = { |
968 title = "Role"; | 968 title = "Role"; |
969 description = "Session role"; | 969 description = "Session role with 'prosody:' prefix removed"; |
970 width = 20; | 970 width = #"admin"; |
971 key = "role"; | 971 key = "role"; |
972 mapper = function(role) | 972 mapper = function(role) |
973 return role and role.name; | 973 local name = role and role.name; |
974 return name and name:match"^prosody:(%w+)" or name; | |
974 end; | 975 end; |
975 } | 976 } |
976 }; | 977 }; |
977 | 978 |
978 local function get_colspec(colspec, default) | 979 local function get_colspec(colspec, default) |