From 35f4b3f48afc9645a57544df4f5e62f64b5dc403 Mon Sep 17 00:00:00 2001 From: MrPowerGamerBR Date: Tue, 22 Oct 2024 16:12:50 -0300 Subject: [PATCH] Whoops, fix 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 d55f9d48..dc454e20 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 @@ -70,7 +70,7 @@ class CheckDupeClientIds(val helper: LorittaHelper) : RunnableCoroutine { val alreadyChecked = mutableSetOf() for (user in dailiesGotInLast24Hours) { - if (user[Dailies.receivedById] !in alreadyChecked) + if (user[Dailies.receivedById] in alreadyChecked) continue val bannedUsersAssociatedWithThisUser = clientIdsThatAreBanned.filter { it[BrowserFingerprints.clientId] == user[BrowserFingerprints.clientId] } @@ -79,7 +79,7 @@ class CheckDupeClientIds(val helper: LorittaHelper) : RunnableCoroutine { usersToBeBanned.add( BannedUser( user[Dailies.receivedById], - bannedUsersAssociatedWithThisUser.map { it[BannedUsers.userId] }, + bannedUsersAssociatedWithThisUser.map { it[BannedUsers.userId] }.distinct(), user[BrowserFingerprints.clientId], bannedUsersAssociatedWithThisUser.minBy { it[BannedUsers.bannedAt] }[BannedUsers.reason], user[Profiles.money]