From 9e5fcf49049a47bbc6d48a205f2b5e919e32bde5 Mon Sep 17 00:00:00 2001 From: Calvin Montgomery Date: Sun, 17 May 2020 10:30:46 -0700 Subject: [PATCH] Fix #866 --- package.json | 2 +- src/channel/channel.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 745d5e47..a003e77d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Calvin Montgomery", "name": "CyTube", "description": "Online media synchronizer and chat", - "version": "3.70.1", + "version": "3.70.2", "repository": { "url": "http://github.com/calzoneman/sync" }, diff --git a/src/channel/channel.js b/src/channel/channel.js index 3abcd259..e08ed1e6 100644 --- a/src/channel/channel.js +++ b/src/channel/channel.js @@ -444,6 +444,13 @@ Channel.prototype.acceptUser = function (user) { }); this.sendUserlist([user]); + + // Managing this from here is not great, but due to the sequencing involved + // and the limitations of the existing design, it'll have to do. + if (this.modules.playlist.leader !== null) { + user.socket.emit("setLeader", this.modules.playlist.leader.getName()); + } + this.broadcastUsercount(); if (!this.is(Flags.C_REGISTERED)) { user.socket.emit("channelNotRegistered");