From 1af74e957d206b508463d7d86a7a594e879be235 Mon Sep 17 00:00:00 2001 From: Lamp Date: Tue, 10 Oct 2023 18:04:19 -0500 Subject: [PATCH] ignore unknown participant bye --- mppbridger.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mppbridger.js b/mppbridger.js index df47fb1..a0b3eed 100644 --- a/mppbridger.js +++ b/mppbridger.js @@ -127,6 +127,7 @@ global.createMPPbridge = async function createMPPbridge({room, channel, uri}) { }); gClient.prependListener("bye", async msg => { var participant = gClient.ppl[msg.p]; + if (!participant) return; d.send(`\`${participant._id.substr(0,6)}\` ___**${sanitizeName(participant.name)}** left the room.___`); }); @@ -196,4 +197,4 @@ dClient.once("ready", async function () { handleError(error, JSON.stringify(bridge)); } } -}); \ No newline at end of file +});