From b7c2b86be116934c54cef43866a58b618b63fbac Mon Sep 17 00:00:00 2001 From: HoeenHero Date: Wed, 21 Sep 2016 09:01:37 -0400 Subject: [PATCH] Hide text when users join a room --- users.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/users.js b/users.js index 158a2ce8ff5f..776c4fc09002 100644 --- a/users.js +++ b/users.js @@ -293,6 +293,12 @@ class Connection { if (this.inRooms.has(room.id)) return; this.inRooms.add(room.id); Sockets.channelAdd(this.worker, room.id, this.socketid); + if (room.id !== 'global') { + for (let i = room.log.length - 100; i < room.log.length; i++) { + if (i < 0) continue; + if (room.log[i].includes('|unlink|hide|')) this.sendTo(room.id, '|unlink|hide|' + room.log[i].substring(13)); + } + } } leaveRoom(room) { if (this.inRooms.has(room.id)) {