forked from Hri7566/mpp-server-dev2
hidden user
This commit is contained in:
parent
d67d7c1ce7
commit
9a72f2a2bc
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue