Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Fix mod_muc_max_occupants to properly ignore whitelisted users

Steve Frécinauxaff6d4b36dc6
diff --git a/resources/prosody-plugins/mod_muc_max_occupants.lua b/resources/prosody-plugins/mod_muc_max_occupants.lua
index b84f228d2d..fa72a2e473 100644
--- a/resources/prosody-plugins/mod_muc_max_occupants.lua
+++ b/resources/prosody-plugins/mod_muc_max_occupants.lua
@@ -46,6 +46,7 @@ local function check_for_max_occupants(event)
-- For each person in the room that's not on the whitelist, subtract one
-- from the count.
for _, occupant in room:each_occupant() do
+ user, domain, res = split_jid(occupant.bare_jid);
if not whitelist:contains(domain) and not whitelist:contains(user..'@'..domain) then
slots = slots - 1
end