Got chromecasting working again with the new channel-names

This commit is contained in:
Kasper Rynning-Tønnesen
2018-08-16 14:48:13 +02:00
parent 1a21297cd3
commit a205972fff

View File

@@ -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);