diff options
author | Kim Alvefur <zash@zash.se> | 2018-06-18 04:25:01 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-06-18 04:25:01 +0200 |
commit | 86866da884f2749767404ad5fe025b54d7991b48 (patch) | |
tree | 56707456772fe90ffa7e7f5edee79978f527a5e2 /plugins | |
parent | 9c32bebf6f4947699da33c082c4f254ee1fd328b (diff) | |
download | prosody-86866da884f2749767404ad5fe025b54d7991b48.tar.gz prosody-86866da884f2749767404ad5fe025b54d7991b48.zip |
MUC: Normalize role value, fixes removal on loss of membership (thanks mimi89999)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/muc/muc.lib.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index c925329f..09cc237a 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -51,6 +51,7 @@ function room_mt:get_default_role(affiliation) affiliation = affiliation; affiliation_rank = valid_affiliations[affiliation or "none"]; }); + role = role ~= "none" and role or nil; -- coerces `role == false` to `nil` return role, valid_roles[role or "none"]; end module:hook("muc-get-default-role", function(event) |