mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat: Visitors promotion (#14119)
* fix: Fixes wrong warning message. * fix: Detect enables/disables visitors for a room. * fix: We need customusername in all cases of auto-allow setting. * feat: Sends promotion-request to all moderators. * feat(visitors): Implements request promotion. * feat(visitors): Implements single moderator and vpass cases for moderators. * fix: Fixes clearing request instances from UI. * feat: Implements visitors approval for mobile. * squash: Drops unused and wrong report for auto allow promotion. * squash: Returns early based on count. * squash: Moves translation to common key. * squash: Adds dependencies for useCallback. * squash: comments. * squash: Refactor 1 to unify with native. * squash: Rename some styles. * squash: Fixes error dew to fewer hooks error. * squash: Renames VISITOR_PROMOTION_REQUEST_DENIED. * squash: Fix renaming component. * squash: Suggestions.
This commit is contained in:
@@ -416,11 +416,33 @@ function is_moderated(room_jid)
|
||||
return false;
|
||||
end
|
||||
|
||||
-- check if the room tenant starts with
|
||||
-- vpaas-magic-cookie-
|
||||
function is_vpaas(room_jid)
|
||||
local node, host = jid.split(room_jid);
|
||||
if host ~= muc_domain or not node then
|
||||
module:log('debug', 'Not the same host');
|
||||
return false;
|
||||
end
|
||||
local tenant, conference_name = node:match('^%[([^%]]+)%](.+)$');
|
||||
if not (tenant and conference_name) then
|
||||
module:log('debug', 'Not a vpaas room %s', room_jid);
|
||||
return false;
|
||||
end
|
||||
local vpaas_prefix, _ = tenant:match('^(vpaas%-magic%-cookie%-)(.*)$')
|
||||
if vpaas_prefix ~= 'vpaas-magic-cookie-' then
|
||||
module:log('debug', 'Not a vpaas room %s', room_jid);
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
return {
|
||||
extract_subdomain = extract_subdomain;
|
||||
is_feature_allowed = is_feature_allowed;
|
||||
is_healthcheck_room = is_healthcheck_room;
|
||||
is_moderated = is_moderated;
|
||||
is_vpaas = is_vpaas;
|
||||
get_focus_occupant = get_focus_occupant;
|
||||
get_room_from_jid = get_room_from_jid;
|
||||
get_room_by_name_and_subdomain = get_room_by_name_and_subdomain;
|
||||
|
||||
Reference in New Issue
Block a user