From 434cc5a8913cb4e060fb423bffb48c811bc99f2f Mon Sep 17 00:00:00 2001 From: MrPowerGamerBR Date: Thu, 31 Oct 2024 22:10:59 -0300 Subject: [PATCH] Fix tempban check --- .../helper/utils/lorittaautomods/CheckDupeClientIds.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/net/perfectdreams/loritta/helper/utils/lorittaautomods/CheckDupeClientIds.kt b/src/main/kotlin/net/perfectdreams/loritta/helper/utils/lorittaautomods/CheckDupeClientIds.kt index e0efca45..79095314 100644 --- a/src/main/kotlin/net/perfectdreams/loritta/helper/utils/lorittaautomods/CheckDupeClientIds.kt +++ b/src/main/kotlin/net/perfectdreams/loritta/helper/utils/lorittaautomods/CheckDupeClientIds.kt @@ -67,14 +67,14 @@ class CheckDupeClientIds(val helper: LorittaHelper) : RunnableCoroutine { val usersToBeBanned = transaction(helper.databases.lorittaDatabase) { val now = Instant.now() - .minusSeconds(604_800) // 7 days + val nowInThePast = now.minusSeconds(604_800) // 7 days val dailiesRecentlyRetrievedHours = Dailies .innerJoin(BrowserFingerprints) .innerJoin(Profiles, { Profiles.id }, { Dailies.receivedById }) .selectAll() .where { - Dailies.receivedAt greaterEq now.toEpochMilli() and (Dailies.receivedById notInSubQuery validBannedUsersList(now.toEpochMilli())) + Dailies.receivedAt greaterEq nowInThePast.toEpochMilli() and (Dailies.receivedById notInSubQuery validBannedUsersList(now.toEpochMilli())) } .toList()