mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-03 15:16:58 +02:00
Update to 2025-06-16 16:00
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
local util = module:require "util";
|
||||
local is_admin = util.is_admin;
|
||||
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";
|
||||
local json = require 'cjson.safe';
|
||||
local um_is_admin = require "core.usermanager".is_admin;
|
||||
local jid_split = require 'util.jid'.split;
|
||||
|
||||
-- we use async to detect Prosody 0.10 and earlier
|
||||
@@ -30,10 +32,6 @@ module:log("info", "Starting speakerstats for %s", muc_component_host);
|
||||
|
||||
local main_muc_service;
|
||||
|
||||
local function is_admin(jid)
|
||||
return um_is_admin(jid, module.host);
|
||||
end
|
||||
|
||||
-- Searches all rooms in the main muc component that holds a breakout room
|
||||
-- caches it if found so we don't search it again
|
||||
-- we should not cache objects in _data as this is being serialized when calling room:save()
|
||||
@@ -221,14 +219,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
|
||||
|
Reference in New Issue
Block a user