fix: speakerstats_component, attempt to index (a nil value)
This commit is contained in:
parent
830817d7b4
commit
da33d8a033
|
@ -41,6 +41,11 @@ function on_message(event)
|
||||||
return false;
|
return false;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not room.speakerStats then
|
||||||
|
log("warn", "No speakerStats found for %s", roomAddress);
|
||||||
|
return false;
|
||||||
|
end
|
||||||
|
|
||||||
local roomSpeakerStats = room.speakerStats;
|
local roomSpeakerStats = room.speakerStats;
|
||||||
local from = event.stanza.attr.from;
|
local from = event.stanza.attr.from;
|
||||||
|
|
||||||
|
@ -188,6 +193,10 @@ function occupant_leaving(event)
|
||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not room.speakerStats then
|
||||||
|
return;
|
||||||
|
end
|
||||||
|
|
||||||
local occupant = event.occupant;
|
local occupant = event.occupant;
|
||||||
|
|
||||||
local speakerStatsForOccupant = room.speakerStats[occupant.jid];
|
local speakerStatsForOccupant = room.speakerStats[occupant.jid];
|
||||||
|
|
Loading…
Reference in New Issue