From 76d8973509253fc4c266ff5aa42bbe5a99fb4e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Thu, 1 Mar 2018 15:42:09 +0100 Subject: [PATCH] Shuffling is limited per channel instead of client --- server/handlers/list_change.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/handlers/list_change.js b/server/handlers/list_change.js index 58977aa9..386036f6 100644 --- a/server/handlers/list_change.js +++ b/server/handlers/list_change.js @@ -244,7 +244,7 @@ function shuffle(msg, coll, guid, offline, socket) { db.collection("timeout_api").find({ type: "shuffle", - guid: guid, + guid: coll, }, function(err, docs) { if(docs.length > 0) { var date = new Date(docs[0].createdAt); @@ -257,11 +257,11 @@ function shuffle(msg, coll, guid, offline, socket) { } } var now_date = new Date(); - db.collection("timeout_api").update({type: "shuffle", guid: guid}, { + db.collection("timeout_api").update({type: "shuffle", guid: coll}, { $set: { "createdAt": now_date, type: "shuffle", - guid: guid, + guid: coll, }, }, {upsert: true}, function(err, docs) { Functions.check_inlist(coll, guid, socket, offline);