# HG changeset patch # User Kim Alvefur # Date 1529288701 -7200 # Node ID 2502be210a8537fabdd5e3db90833be16606cb32 # Parent e9acb928c6374b5007a8d79d9627e25cc7133be9 MUC: Normalize role value, fixes removal on loss of membership (thanks mimi89999) diff -r e9acb928c637 -r 2502be210a85 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Fri Mar 09 19:03:50 2018 +0100 +++ b/plugins/muc/muc.lib.lua Mon Jun 18 04:25:01 2018 +0200 @@ -51,6 +51,7 @@ 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)