From cb2b49c8e20a10af8e5a1480238166117e4deba8 Mon Sep 17 00:00:00 2001 From: Hri7566 Date: Sat, 9 Jul 2022 05:24:23 -0400 Subject: [PATCH] urgent --- src/Channel.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/Channel.js b/src/Channel.js index 92c3284..4963254 100644 --- a/src/Channel.js +++ b/src/Channel.js @@ -686,16 +686,8 @@ class Channel extends EventEmitter { this.setCoords(p, msg.x, msg.y); }); - this.on("a", (msg) => { - if (!msg.msg) return; - if (!msg.participant) return; - if (typeof msg.msg !== 'object') return; - if (typeof msg.participant !== 'object') return; - if (!msg.msg.m) return; - if (msg.msg.m !== 'a') return; - if (!msg.participant.name) return; - if (!msg.participant._id) return; - this.chat(msg.participant, msg.msg); + this.on("a", (participant, msg) => { + this.chat(participant, msg); }); this.on("update", (cl, set) => {