mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
fix(speakerstats): Filters speaker stats to not include hidden participants.
* fix(speakerstats): Filters speaker stats to not include hidden participants. * squash: Make recorder prefixes configurable.
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
local util = module:require "util";
|
||||
local get_room_from_jid = util.get_room_from_jid;
|
||||
local room_jid_match_rewrite = util.room_jid_match_rewrite;
|
||||
local is_jibri = util.is_jibri;
|
||||
local is_healthcheck_room = util.is_healthcheck_room;
|
||||
local process_host_module = util.process_host_module;
|
||||
local is_transcriber_jigasi = util.is_transcriber_jigasi;
|
||||
local jid_resource = require "util.jid".resource;
|
||||
local st = require "util.stanza";
|
||||
local socket = require "socket";
|
||||
@@ -221,14 +223,15 @@ end
|
||||
|
||||
-- Create SpeakerStats object for the joined user
|
||||
function occupant_joined(event)
|
||||
local occupant, room = event.occupant, event.room;
|
||||
local occupant, room, stanza = event.occupant, event.room, event.stanza;
|
||||
|
||||
if is_healthcheck_room(room.jid) or is_admin(occupant.bare_jid) then
|
||||
if is_healthcheck_room(room.jid)
|
||||
or is_admin(occupant.bare_jid)
|
||||
or is_transcriber_jigasi(stanza)
|
||||
or is_jibri(occupant) then
|
||||
return;
|
||||
end
|
||||
|
||||
local occupant = event.occupant;
|
||||
|
||||
local nick = jid_resource(occupant.nick);
|
||||
|
||||
if room.speakerStats then
|
||||
|
||||
@@ -31,6 +31,7 @@ local roomless_iqs = {};
|
||||
|
||||
local OUTBOUND_SIP_JIBRI_PREFIXES = { 'outbound-sip-jibri@', 'sipjibriouta@', 'sipjibrioutb@' };
|
||||
local INBOUND_SIP_JIBRI_PREFIXES = { 'inbound-sip-jibri@', 'sipjibriina@', 'sipjibriina@' };
|
||||
local RECORDER_PREFIXES = module:get_option_inherited_set('recorder_prefixes', { 'recorder@recorder.', 'jibria@recorder.', 'jibrib@recorder.' });
|
||||
|
||||
local split_subdomain_cache = cache.new(1000);
|
||||
local extract_subdomain_cache = cache.new(1000);
|
||||
@@ -530,6 +531,10 @@ function is_sip_jibri_join(stanza)
|
||||
return false
|
||||
end
|
||||
|
||||
function is_jibri(occupant)
|
||||
return starts_with_one_of(occupant.jid, RECORDER_PREFIXES)
|
||||
end
|
||||
|
||||
-- process a host module directly if loaded or hooks to wait for its load
|
||||
function process_host_module(name, callback)
|
||||
local function process_host(host)
|
||||
@@ -595,8 +600,10 @@ end
|
||||
return {
|
||||
OUTBOUND_SIP_JIBRI_PREFIXES = OUTBOUND_SIP_JIBRI_PREFIXES;
|
||||
INBOUND_SIP_JIBRI_PREFIXES = INBOUND_SIP_JIBRI_PREFIXES;
|
||||
RECORDER_PREFIXES = RECORDER_PREFIXES;
|
||||
extract_subdomain = extract_subdomain;
|
||||
is_feature_allowed = is_feature_allowed;
|
||||
is_jibri = is_jibri;
|
||||
is_healthcheck_room = is_healthcheck_room;
|
||||
is_moderated = is_moderated;
|
||||
is_sip_jibri_join = is_sip_jibri_join;
|
||||
|
||||
Reference in New Issue
Block a user