From a006206e2eea309f88e28458266b95249a25aa0e Mon Sep 17 00:00:00 2001 From: Hri7566 Date: Sat, 18 Jun 2022 00:43:33 -0400 Subject: [PATCH] hidden user --- src/Channel.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Channel.js b/src/Channel.js index 790e5e2..47abcc5 100644 --- a/src/Channel.js +++ b/src/Channel.js @@ -268,6 +268,19 @@ class Channel extends EventEmitter { let chppl = []; [...this.ppl.values()].forEach(c => { + if (cl) { + if (c.hidden == true && c.user._id !== cl.user._id) { + return; + } else { + let u = { + _id: c.user._id, + name: c.user.name + ' [HIDDEN]', + color: c.user.color, + id: c.participantId + } + chppl.push(u); + } + } let u = { _id: c.user._id, name: c.user.name,