Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions resources/prosody-plugins/mod_muc_lobby_rooms.lua
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,11 @@ function destroy_lobby_room(room, newjid, message)
lobby_room_obj:destroy(newjid, message);

module:log('info', 'Lobby room destroyed %s', lobby_room_obj.jid)

if room.jitsiMetadata then
room.jitsiMetadata.lobbyEnabled = false;
module:context(main_muc_component_config):fire_event('room-metadata-changed', { room = room; });
end
end
room._data.lobbyroom = nil;
room._data.lobby_extra_reason = nil;
Expand Down Expand Up @@ -482,7 +487,6 @@ process_host_module(main_muc_component_config, function(host_module, host)
return;
end
local members_only = event.fields['muc#roomconfig_membersonly'] and true or nil;
local room_metadata_changed = false;
if members_only then
local lobby_created = attach_lobby_room(room, actor);
if lobby_created then
Expand All @@ -495,21 +499,12 @@ process_host_module(main_muc_component_config, function(host_module, host)
room.jitsiMetadata = {};
end
room.jitsiMetadata.lobbyEnabled = true;
room_metadata_changed = true;
host_module:fire_event('room-metadata-changed', { room = room; });
end
elseif room._data.lobbyroom then
destroy_lobby_room(room, room.jid);
destroy_lobby_room(room, room.jid, nil);
module:fire_event('jitsi-lobby-disabled', { room = room; });
notify_lobby_enabled(room, actor, false);

if room.jitsiMetadata then
room.jitsiMetadata.lobbyEnabled = false;
room_metadata_changed = true;
end
end

if room_metadata_changed then
host_module:fire_event('room-metadata-changed', { room = room; });
end
end);
host_module:hook('muc-room-destroyed',function(event)
Expand Down
4 changes: 4 additions & 0 deletions resources/prosody-plugins/mod_visitors_component.lua
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,10 @@ process_host_module(muc_domain_prefix..'.'..muc_domain_base, function(host_modul
elseif room._data.participants then
-- This is non jaas room which has a list of participants allowed to participate in the main room
-- but this occupant is not one of them and the room is either not live or has no participants joined
if room:get_members_only() then
-- if there is a lobby, let's pass it through it will wait for the main participant
return;
end
session.log('warn',
'Deny user join in the main not live meeting, not in the list of main participants');
session.send(st.error_reply(
Expand Down