From d3dfd0fb826d629e9a589452937d1339572711e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Thu, 16 Aug 2018 14:48:13 +0200 Subject: [PATCH] Got chromecasting working again with the new channel-names --- server/handlers/io.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/handlers/io.js b/server/handlers/io.js index 42c877f3..a2f6aeb6 100644 --- a/server/handlers/io.js +++ b/server/handlers/io.js @@ -98,10 +98,10 @@ module.exports = function() { msg.hasOwnProperty("socket_id") && msg.hasOwnProperty("channel") && typeof(msg.guid) == "string" && typeof(msg.channel) == "string" && typeof(msg.socket_id) == "string" && msg.channel != "") { db.collection("connected_users").find({"_id": msg.channel}, function(err, connected_users_channel) { + if(msg.hasOwnProperty("channel")) { + msg.channel = Functions.encodeChannelName(msg.channel); + } if(connected_users_channel.length > 0 && connected_users_channel[0].users.indexOf(msg.guid) > -1) { - if(msg.hasOwnProperty("channel")) { - msg.channel = Functions.encodeChannelName(msg.channel); - } coll = msg.channel.toLowerCase();//.replace(/ /g,''); coll = Functions.removeEmojis(coll).toLowerCase(); //coll = filter.clean(coll);