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 | bf2c33a73eb03f04a212888be627e9c7b9651cd9 (patch) | |
tree | 56707456772fe90ffa7e7f5edee79978f527a5e2 | |
parent | a062706194343729427d4450bbf0e9cd6c4e9215 (diff) | |
download | prosody-bf2c33a73eb03f04a212888be627e9c7b9651cd9.tar.gz prosody-bf2c33a73eb03f04a212888be627e9c7b9651cd9.zip |
MUC: Normalize role value, fixes removal on loss of membership (thanks mimi89999)
-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) |