Pārlūkot izejas kodu

fix(speaker-stats): calculate total dominant speaker time if user is dominant and has no previous speaker time

master
Gabriel Borlea 3 gadus atpakaļ
vecāks
revīzija
af01072827

+ 1
- 1
resources/prosody-plugins/mod_speakerstats_component.lua Parādīt failu

@@ -151,7 +151,7 @@ function occupant_joined(event)
151 151
                 -- and skip focus if sneaked into the table
152 152
                 if values.nick ~= nil and values.nick ~= 'focus' then
153 153
                     local totalDominantSpeakerTime = values.totalDominantSpeakerTime;
154
-                    if totalDominantSpeakerTime > 0 or room:get_occupant_jid(jid) == nil then
154
+                    if totalDominantSpeakerTime > 0 or room:get_occupant_jid(jid) == nil or values:isDominantSpeaker() then
155 155
                         -- before sending we need to calculate current dominant speaker state
156 156
                         if values:isDominantSpeaker() then
157 157
                             local timeElapsed = math.floor(socket.gettime()*1000 - values._dominantSpeakerStart);

Notiek ielāde…
Atcelt
Saglabāt