mirror of
https://github.com/KevinMidboe/zoff.git
synced 2026-01-17 23:16:02 +00:00
Shuffling is limited per channel instead of client
This commit is contained in:
@@ -244,7 +244,7 @@ function shuffle(msg, coll, guid, offline, socket) {
|
|||||||
|
|
||||||
db.collection("timeout_api").find({
|
db.collection("timeout_api").find({
|
||||||
type: "shuffle",
|
type: "shuffle",
|
||||||
guid: guid,
|
guid: coll,
|
||||||
}, function(err, docs) {
|
}, function(err, docs) {
|
||||||
if(docs.length > 0) {
|
if(docs.length > 0) {
|
||||||
var date = new Date(docs[0].createdAt);
|
var date = new Date(docs[0].createdAt);
|
||||||
@@ -257,11 +257,11 @@ function shuffle(msg, coll, guid, offline, socket) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
var now_date = new Date();
|
var now_date = new Date();
|
||||||
db.collection("timeout_api").update({type: "shuffle", guid: guid}, {
|
db.collection("timeout_api").update({type: "shuffle", guid: coll}, {
|
||||||
$set: {
|
$set: {
|
||||||
"createdAt": now_date,
|
"createdAt": now_date,
|
||||||
type: "shuffle",
|
type: "shuffle",
|
||||||
guid: guid,
|
guid: coll,
|
||||||
},
|
},
|
||||||
}, {upsert: true}, function(err, docs) {
|
}, {upsert: true}, function(err, docs) {
|
||||||
Functions.check_inlist(coll, guid, socket, offline);
|
Functions.check_inlist(coll, guid, socket, offline);
|
||||||
|
|||||||
Reference in New Issue
Block a user