This commit is contained in:
Jack 2020-08-18 22:08:09 +01:00
parent a16435249b
commit 6e1a9b46b3

View file

@ -547,9 +547,10 @@ exports.testCompleted = functions.https.onCall(async (request, response) => {
if (verified === false || verified === undefined) {
if (keySpacing !== null && keyDuration !== null) {
if (
keySpacing.sd <= 15 ||
keyDuration.sd <= 10 ||
keyDuration.average < 15
(keySpacing.sd <= 15 ||
keyDuration.sd <= 10 ||
keyDuration.average < 15) &&
obj.consistency < 70
) {
console.error(
`possible bot detected by user (${obj.wpm} ${obj.rawWpm} ${