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(prosody): Drops moderator_id in favor of moderators list.
damenchodbf756eaad14
diff --git a/resources/prosody-plugins/README.md b/resources/prosody-plugins/README.mdindex 76e61cc4a3..4151cdd2c8 100644--- a/resources/prosody-plugins/README.md+++ b/resources/prosody-plugins/README.md@@ -16,7 +16,6 @@- lobbyroom - Holds the JID of the lobby room if it exists. It is set by mod_muc_lobby_rooms.lua when a lobby room is created. Value is available in the room config form for all clients to use it.- max_occupants - The maximum number of occupants allowed in the room used by mod_muc_max_occupants.- meetingId - A unique identifier for the meeting, generated by mod_muc_meeting_id. Set in the room config form for all clients to use it. It is also sent to all visitor nodes if any.-- moderator_id - The id (from the token) for the moderator of the room. The value can be userId or a groupId where all participants from the same group will be moderators. You need a custom module to set participants as moderators based on the field.- moderators - A list of moderator ids (from the token) that are allowed to join the room. The list is sent to jicofo to take decisions about forwarding to main room or visitor node in case of large meetings. Those participants will be moderators. You need a custom module to set participants as moderators based on the field.- participants - A list of participants ids (from the token) that are allowed to join the room. The list is sent to jicofo to take decisions about forwarding to main room or visitor node in case of large meetings. Those participants will not be moderators.- participants_details - Used in mod_muc_flip to store details about authenticated participants in the room. A table where the keys are participant id from the token and the values are their room jid.diff --git a/resources/prosody-plugins/mod_room_metadata_component.lua b/resources/prosody-plugins/mod_room_metadata_component.luaindex d221ca8914..9e031cfd67 100644--- a/resources/prosody-plugins/mod_room_metadata_component.lua+++ b/resources/prosody-plugins/mod_room_metadata_component.lua@@ -86,10 +86,6 @@ function send_metadata(occupant, room, json_msg)participants:append(room._data.participants);end- if room._data.moderator_id then- moderators:push(room._data.moderator_id);- end-if room._data.moderators thenmoderators:append(room._data.moderators);enddiff --git a/resources/prosody-plugins/mod_visitors_component.lua b/resources/prosody-plugins/mod_visitors_component.luaindex c71fdc66e2..267756e98b 100644--- a/resources/prosody-plugins/mod_visitors_component.lua+++ b/resources/prosody-plugins/mod_visitors_component.lua@@ -99,18 +99,14 @@ local function request_promotion_received(room, from_jid, from_vnode, nick, time-- Let's do the force_promote checks if requested-- if it is vpaas meeting we trust the moderator computation from visitor node (value of force_promote_requested)-- if it is not vpaas we need to check further settings only if they exist- if is_vpaas(room) or (not room._data.moderator_id and not room._data.moderators)- -- _data.moderator_id can be used from external modules to set single moderator for a meeting- -- or a whole group of moderators- or (room._data.moderator_id- and room._data.moderator_id == user_id or room._data.moderator_id == group_id)-+ if is_vpaas(room) or not room._data.moderators-- all moderators are allowed to auto promote, the fact that user_id and force_promote_requested are set-- means that the user has token and is moderator on visitor node sideor room._data.allModerators- -- can be used by external modules to set multiple moderator ids (table of values)+ -- can be used by external modules to set multiple moderator ids (table of values) or a groupor table_find(room._data.moderators, user_id)+ or table_find(room._data.moderators, group_id)thenforce_promote = true;end@@ -519,8 +515,6 @@ process_host_module(muc_domain_prefix..'.'..muc_domain_base, function(host_modulor is_sip_jigasi(stanza)or is_sip_jibri_join(stanza)or table_find(room._data.moderators, session.jitsi_meet_context_user and session.jitsi_meet_context_user.id)- or (room._data.moderator_id and room._data.moderator_id == (session.jitsi_meet_context_user and session.jitsi_meet_context_user.id))- or (room._data.moderator_id and room._data.moderator_id == session.jitsi_meet_context_group)or table_find(room._data.participants, session.jitsi_meet_context_user and session.jitsi_meet_context_user.id) thenif DEBUG thenmodule:log('debug', 'Auto-allowing visitor %s in room %s', stanza.attr.from, room.jid);