Added fix for total_viewers count error

This commit is contained in:
Kasper Rynning-Tønnesen
2018-09-04 12:45:16 +02:00
parent 4c73b411d3
commit d6cd183db3
2 changed files with 8 additions and 2 deletions

View File

@@ -115,8 +115,10 @@ function get_short_id(socket) {
function check_inlist(coll, guid, socket, offline, callback)
{
if(coll == undefined) return;
if(coll == undefined) {
if(typeof(callback) == "function") callback();
return;
}
//coll = coll.replace(/ /g,'');
if(!offline && coll != undefined){
db.collection("connected_users").update({"_id": coll}, {$addToSet:{users: guid}}, {upsert: true}, function(err, updated) {