Skip to content

Commit

Permalink
Fix tempban check
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPowerGamerBR committed Nov 1, 2024
1 parent 59c0b66 commit 434cc5a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 434cc5a

Please sign in to comment.