This commit is contained in:
2026-05-22 02:17:52 +05:30
parent 43a6321c0c
commit b5d2472b95
2 changed files with 6 additions and 3 deletions

View File

@@ -384,15 +384,17 @@ module:hook("muc-occupant-pre-join", function(event)
ensure_room_data(room);
local participant_limit = get_participant_limit(session);
local active_participant_count = table_count(room._data.politictalk_participant_jids);
local active_room_occupancy_count = active_participant_count + get_active_host_count(room);
if
participant_limit
and active_participant_count >= participant_limit
and active_room_occupancy_count >= participant_limit
then
module:log(
"warn",
"Blocking participant %s because PoliticTalk room is full: room=%s active=%s limit=%s",
"Blocking participant %s because PoliticTalk room is full: room=%s active=%s participantSeats=%s limit=%s",
tostring(user_id),
tostring(room and room.jid),
tostring(active_room_occupancy_count),
tostring(active_participant_count),
tostring(participant_limit)
);