mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Sending list with also
This commit is contained in:
@@ -253,7 +253,7 @@ function getSessionChatPass(id, callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function setChromecastHost(id, other_id, callback) {
|
function setChromecastHost(id, other_id, list, callback) {
|
||||||
try {
|
try {
|
||||||
if(id == "empty" || id == undefined) {
|
if(id == "empty" || id == undefined) {
|
||||||
callback();
|
callback();
|
||||||
@@ -264,6 +264,7 @@ function setChromecastHost(id, other_id, callback) {
|
|||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
console.log(e);
|
||||||
callback(false);
|
callback(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,13 @@ module.exports = function() {
|
|||||||
db.collection("connected_users").find({"_id": msg.channel}, function(err, connected_users_channel) {
|
db.collection("connected_users").find({"_id": msg.channel}, function(err, connected_users_channel) {
|
||||||
console.log("test: ", connected_users_channel.length > 0 && connected_users_channel[0].users.indexOf(msg.guid) > -1, connected_users_channel.length > 0, connected_users_channel[0].users.indexOf(msg.guid) > -1, connected_users_channel)
|
console.log("test: ", connected_users_channel.length > 0 && connected_users_channel[0].users.indexOf(msg.guid) > -1, connected_users_channel.length > 0, connected_users_channel[0].users.indexOf(msg.guid) > -1, connected_users_channel)
|
||||||
if(connected_users_channel.length > 0 && connected_users_channel[0].users.indexOf(msg.guid) > -1) {
|
if(connected_users_channel.length > 0 && connected_users_channel[0].users.indexOf(msg.guid) > -1) {
|
||||||
Functions.setChromecastHost(socket.cookie_id, msg.guid, function(results) {
|
coll = msg.channel.toLowerCase();//.replace(/ /g,'');
|
||||||
|
coll = Functions.removeEmojis(coll).toLowerCase();
|
||||||
|
coll = filter.clean(coll);
|
||||||
|
if(coll.indexOf("?") > -1){
|
||||||
|
coll = coll.substring(0, coll.indexOf("?"));
|
||||||
|
}
|
||||||
|
Functions.setChromecastHost(socket.cookie_id, msg.guid, msg.channel, function(results) {
|
||||||
console.log("setChromecastHost: ", results);
|
console.log("setChromecastHost: ", results);
|
||||||
});
|
});
|
||||||
socket.cookie_id = msg.guid;
|
socket.cookie_id = msg.guid;
|
||||||
@@ -99,13 +105,6 @@ module.exports = function() {
|
|||||||
if(msg.hasOwnProperty("channel")) {
|
if(msg.hasOwnProperty("channel")) {
|
||||||
msg.channel = Functions.encodeChannelName(msg.channel);
|
msg.channel = Functions.encodeChannelName(msg.channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
coll = msg.channel.toLowerCase();//.replace(/ /g,'');
|
|
||||||
coll = Functions.removeEmojis(coll).toLowerCase();
|
|
||||||
coll = filter.clean(coll);
|
|
||||||
if(coll.indexOf("?") > -1){
|
|
||||||
coll = coll.substring(0, coll.indexOf("?"));
|
|
||||||
}
|
|
||||||
in_list = true;
|
in_list = true;
|
||||||
console.log("chromecast list", coll);
|
console.log("chromecast list", coll);
|
||||||
chromecast_object = true;
|
chromecast_object = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user