Sfoglia il codice sorgente

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

master
Gabriel Borlea 3 anni fa
parent
commit
af01072827

+ 1
- 1
resources/prosody-plugins/mod_speakerstats_component.lua Vedi File

151
                 -- and skip focus if sneaked into the table
151
                 -- and skip focus if sneaked into the table
152
                 if values.nick ~= nil and values.nick ~= 'focus' then
152
                 if values.nick ~= nil and values.nick ~= 'focus' then
153
                     local totalDominantSpeakerTime = values.totalDominantSpeakerTime;
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
                         -- before sending we need to calculate current dominant speaker state
155
                         -- before sending we need to calculate current dominant speaker state
156
                         if values:isDominantSpeaker() then
156
                         if values:isDominantSpeaker() then
157
                             local timeElapsed = math.floor(socket.gettime()*1000 - values._dominantSpeakerStart);
157
                             local timeElapsed = math.floor(socket.gettime()*1000 - values._dominantSpeakerStart);

Loading…
Annulla
Salva