Limits the amount of zaps on the user profile

pull/933/head
Vitor Pamplona 2024-06-20 16:30:12 -04:00
rodzic 9e9e0667cd
commit b39ac214a5
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -96,6 +96,7 @@ object NostrUserProfileDataSource : NostrDataSource("UserProfileFeed") {
JsonFilter(
kinds = listOf(LnZapEvent.KIND),
tags = mapOf("p" to listOf(it.pubkeyHex)),
limit = 200,
),
)
}
@ -178,7 +179,6 @@ object NostrUserProfileDataSource : NostrDataSource("UserProfileFeed") {
createAcceptedAwardsFilter(),
createReceivedAwardsFilter(),
createBookmarksFilter(),
)
.ifEmpty { null }
).ifEmpty { null }
}
}

Wyświetl plik

@ -55,5 +55,7 @@ object TimeUtils {
fun oneWeekAgo() = now() - ONE_WEEK
fun oneMonthAgo() = now() - ONE_MONTH
fun randomWithTwoDays() = System.currentTimeMillis() / 1000 - CryptoUtils.randomInt(twoDays())
}