Add context user on speaker stats
This commit is contained in:
parent
02fb37189b
commit
6ecd150f75
|
@ -62,11 +62,12 @@ end
|
|||
local SpeakerStats = {};
|
||||
SpeakerStats.__index = SpeakerStats;
|
||||
|
||||
function new_SpeakerStats(nick)
|
||||
function new_SpeakerStats(nick, context_user)
|
||||
return setmetatable({
|
||||
totalDominantSpeakerTime = 0;
|
||||
_dominantSpeakerStart = 0;
|
||||
nick = nick;
|
||||
context_user = context_user;
|
||||
displayName = nil;
|
||||
}, SpeakerStats);
|
||||
end
|
||||
|
@ -106,6 +107,7 @@ end
|
|||
function occupant_joined(event)
|
||||
local room = event.room;
|
||||
local occupant = event.occupant;
|
||||
|
||||
local nick = jid_resource(occupant.nick);
|
||||
|
||||
if room.speakerStats then
|
||||
|
@ -150,7 +152,8 @@ function occupant_joined(event)
|
|||
room:route_stanza(stanza);
|
||||
end
|
||||
|
||||
room.speakerStats[occupant.jid] = new_SpeakerStats(nick);
|
||||
local context_user = event.origin and event.origin.jitsi_meet_context_user or nil;
|
||||
room.speakerStats[occupant.jid] = new_SpeakerStats(nick, context_user);
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue