Skip to content

Commit 3fd9ce5

Browse files
authored
* fix(lobby): Updates metadata on destroy lobby room and let in participants on empty main.
* fix(lobby): Updates metadata on destroy lobby room. * fix(visitors): Let people join lobby when main room is empty but with lobby.
1 parent 93022b3 commit 3fd9ce5

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

resources/prosody-plugins/mod_muc_lobby_rooms.lua

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,11 @@ function destroy_lobby_room(room, newjid, message)
254254
lobby_room_obj:destroy(newjid, message);
255255

256256
module:log('info', 'Lobby room destroyed %s', lobby_room_obj.jid)
257+
258+
if room.jitsiMetadata then
259+
room.jitsiMetadata.lobbyEnabled = false;
260+
module:context(main_muc_component_config):fire_event('room-metadata-changed', { room = room; });
261+
end
257262
end
258263
room._data.lobbyroom = nil;
259264
room._data.lobby_extra_reason = nil;
@@ -482,7 +487,6 @@ process_host_module(main_muc_component_config, function(host_module, host)
482487
return;
483488
end
484489
local members_only = event.fields['muc#roomconfig_membersonly'] and true or nil;
485-
local room_metadata_changed = false;
486490
if members_only then
487491
local lobby_created = attach_lobby_room(room, actor);
488492
if lobby_created then
@@ -495,21 +499,12 @@ process_host_module(main_muc_component_config, function(host_module, host)
495499
room.jitsiMetadata = {};
496500
end
497501
room.jitsiMetadata.lobbyEnabled = true;
498-
room_metadata_changed = true;
502+
host_module:fire_event('room-metadata-changed', { room = room; });
499503
end
500504
elseif room._data.lobbyroom then
501-
destroy_lobby_room(room, room.jid);
505+
destroy_lobby_room(room, room.jid, nil);
502506
module:fire_event('jitsi-lobby-disabled', { room = room; });
503507
notify_lobby_enabled(room, actor, false);
504-
505-
if room.jitsiMetadata then
506-
room.jitsiMetadata.lobbyEnabled = false;
507-
room_metadata_changed = true;
508-
end
509-
end
510-
511-
if room_metadata_changed then
512-
host_module:fire_event('room-metadata-changed', { room = room; });
513508
end
514509
end);
515510
host_module:hook('muc-room-destroyed',function(event)

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)