Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(visitors): Adds allow promotion setting per room.

damencho43d5c1e3ba27
diff --git a/resources/prosody-plugins/mod_visitors_component.lua b/resources/prosody-plugins/mod_visitors_component.lua
index c9f2c6369a..1a29fc72ee 100644
--- a/resources/prosody-plugins/mod_visitors_component.lua
+++ b/resources/prosody-plugins/mod_visitors_component.lua
@@ -75,7 +75,7 @@ end
local function request_promotion_received(room, from_jid, from_vnode, nick, time, user_id, group_id, force_promote_requested)
-- if visitors is enabled for the room
if visitors_promotion_map[room.jid] then
- local force_promote = auto_allow_promotion;
+ local force_promote = auto_allow_promotion or get_visitors_room_metadata(room).autoPromote;
if not force_promote and force_promote_requested == 'true' then
-- 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)
@@ -473,7 +473,7 @@ process_host_module(muc_domain_prefix..'.'..muc_domain_base, function(host_modul
end
-- we skip any checks when auto-allow is enabled
- if auto_allow_promotion
+ if (auto_allow_promotion or get_visitors_room_metadata(room).autoPromote)
or ignore_list:contains(jid.host(stanza.attr.from)) -- jibri or other domains to ignore
or is_sip_jigasi(stanza)
or is_sip_jibri_join(stanza)