Chromecast now joining correct namespace

This commit is contained in:
Kasper Rynning-Tønnesen
2017-06-02 15:07:46 +02:00
parent 568a141b21
commit aa3679737b

View File

@@ -157,7 +157,7 @@ io.on('connection', function(socket){
socket.emit("guid", guid); socket.emit("guid", guid);
socket.on("chromecast", function(msg) { socket.on('chromecast', function(msg) {
try { try {
if(typeof(msg) == "object" && msg.hasOwnProperty("guid") && msg.hasOwnProperty("socket_id") && msg.hasOwnProperty("channel")) { if(typeof(msg) == "object" && msg.hasOwnProperty("guid") && msg.hasOwnProperty("socket_id") && msg.hasOwnProperty("channel")) {
if(lists[msg.channel].indexOf(msg.guid) > -1) { if(lists[msg.channel].indexOf(msg.guid) > -1) {
@@ -165,6 +165,7 @@ io.on('connection', function(socket){
socketid = msg.socket_id; socketid = msg.socket_id;
coll = msg.channel; coll = msg.channel;
in_list = true; in_list = true;
socket.join(coll);
} }
} }
} catch(e) { } catch(e) {