Skip to content

Commit aab877e

Browse files
committed
fix(visitors): Let people join lobby when main room is empty but with lobby.
1 parent 0392e7f commit aab877e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

resources/prosody-plugins/mod_muc_lobby_rooms.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ function attach_lobby_room(room, actor)
243243
end
244244

245245
-- destroys lobby room for the supplied main room
246-
function destroy_lobby_room(room, newjid, message, skip_metadata_event)
246+
function destroy_lobby_room(room, newjid, message, send_metadata_event)
247247
if not message then
248248
message = 'Lobby room closed.';
249249
end
@@ -261,7 +261,7 @@ function destroy_lobby_room(room, newjid, message, skip_metadata_event)
261261

262262
if room.jitsiMetadata then
263263
room.jitsiMetadata.lobbyEnabled = false;
264-
if not skip_metadata_event then
264+
if send_metadata_event then
265265
module:context(main_muc_component_config):fire_event('room-metadata-changed', { room = room; });
266266
end
267267
end
@@ -505,7 +505,7 @@ process_host_module(main_muc_component_config, function(host_module, host)
505505
room_metadata_changed = true;
506506
end
507507
elseif room._data.lobbyroom then
508-
destroy_lobby_room(room, room.jid, nil, room_metadata_changed);
508+
destroy_lobby_room(room, room.jid, nil, not room_metadata_changed);
509509
module:fire_event('jitsi-lobby-disabled', { room = room; });
510510
notify_lobby_enabled(room, actor, false);
511511
end

resources/prosody-plugins/mod_visitors_component.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,10 @@ process_host_module(muc_domain_prefix..'.'..muc_domain_base, function(host_modul
565565
elseif room._data.participants then
566566
-- This is non jaas room which has a list of participants allowed to participate in the main room
567567
-- but this occupant is not one of them and the room is either not live or has no participants joined
568+
if room:get_members_only() then
569+
-- if there is a lobby, let's pass it through it will wait for the main participant
570+
return;
571+
end
568572
session.log('warn',
569573
'Deny user join in the main not live meeting, not in the list of main participants');
570574
session.send(st.error_reply(

0 commit comments

Comments
 (0)