fix event array not created yet

This commit is contained in:
Lamp 2018-12-14 06:01:39 +00:00
parent bb3afc2bf6
commit d9de1324ec
1 changed files with 2 additions and 0 deletions

View File

@ -180,6 +180,8 @@ global.createMPPbridge = function createMPPbridge(room, DiscordChannelID, site =
// announce join/leave/rename
gClient._events.p = gClient._events.p || [];
gClient._events.bye = gClient._events.bye || [];
gClient._events.p.unshift(async participant => {
if (gClient.ppl[participant.id]) { // is update
let oldName = gClient.ppl[participant.id].name, newName = participant.name;