diff --git a/resources/prosody-plugins/mod_muc_max_occupants.lua b/resources/prosody-plugins/mod_muc_max_occupants.lua index b84f228d2..fa72a2e47 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