From 7808ab17b6279badc76fdbf41a9e344ba559db07 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 7 Dec 2020 19:05:19 +0000 Subject: [PATCH] not checking leaderboards and pb if a funbox is active --- functions/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/functions/index.js b/functions/index.js index 9c029b4ab..78cebf0c9 100644 --- a/functions/index.js +++ b/functions/index.js @@ -317,6 +317,9 @@ exports.checkNameAvailability = functions.https.onCall( function checkIfPB(uid, obj, userdata) { let pbs = null; + if (obj.funbox !== "none") { + return false; + } try { pbs = userdata.personalBests; if (pbs === undefined) { @@ -1865,6 +1868,11 @@ async function checkLeaderboards( // }; // try { + if (resultObj.funbox !== "none") { + return { + insertedAt: null, + }; + } if (emailVerified === false) return { insertedAt: null,