Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(lobby): Handle disabling lobby. (#16770)
Дамян Минков05e47ade7c90
diff --git a/resources/prosody-plugins/README.md b/resources/prosody-plugins/README.mdindex f6ff75f310..5a38d07c19 100644--- a/resources/prosody-plugins/README.md+++ b/resources/prosody-plugins/README.md@@ -6,6 +6,7 @@- breakout_rooms - A table containing breakout rooms created in the main room. The keys are the JIDs of the breakout rooms, and the values are their subjects.- breakout_rooms_active - Whether there was a breakout room created in the main room.- breakout_rooms_counter - A counter for breakout rooms created in the main room.+- lobby_disabled - Whether lobby was disabled for the room by the backend.- flip_participant_nick - Used in mod_muc_flip, when flipping a participant we store the nick of the second device/participant. Same processing as kicked_participant_nick.- hideDisplayNameForGuests - When set to true, the display name of participants is hidden for guests.- jicofo_lock - A boolean value, when set to true the room is locked waiting for Jicofo to join. All attempts to join will be queued until Jicofo joins.diff --git a/resources/prosody-plugins/mod_muc_lobby_rooms.lua b/resources/prosody-plugins/mod_muc_lobby_rooms.luaindex 5d4d6fa858..595c3f0f5a 100644--- a/resources/prosody-plugins/mod_muc_lobby_rooms.lua+++ b/resources/prosody-plugins/mod_muc_lobby_rooms.lua@@ -413,11 +413,16 @@ function process_lobby_muc_loaded(lobby_muc, host_module)host_module:hook('host-disco-info-node', function (event)local session, reply, node = event.origin, event.reply, event.node;if node == LOBBY_IDENTITY_TYPE- and session.jitsi_web_query_room- and check_display_name_required then+ and session.jitsi_web_query_room thenlocal room = get_room_by_name_and_subdomain(session.jitsi_web_query_room, session.jitsi_web_query_prefix);- if room and room._data.lobbyroom then+ if room and room._data.lobby_disabled then+ -- we cannot remove the child from the stanza so let's just change the type+ local lobby_identity = reply:get_child_with_attr('identity', nil, 'type', LOBBY_IDENTITY_TYPE);+ lobby_identity.attr.type = 'DISABLED_'..LOBBY_IDENTITY_TYPE;+ end++ if check_display_name_required and room and room._data.lobbyroom thenreply:tag('feature', { var = DISPLAY_NAME_REQUIRED_FEATURE }):up();endend@@ -489,6 +494,11 @@ process_host_module(main_muc_component_config, function(host_module, host)endlocal members_only = event.fields['muc#roomconfig_membersonly'] and true or nil;if members_only then+ -- if lobby disabled just ignore and return+ if room._data.lobby_disabled then+ module:log('warn', 'Lobby is disabled for room %s, cannot enable members only', room.jid);+ return;+ endlocal lobby_created = attach_lobby_room(room, actor);if lobby_created thenmodule:fire_event('jitsi-lobby-enabled', { room = room; });