mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-30 02:43:27 +02:00
Limits the amount of zaps on the user profile
This commit is contained in:
@@ -96,6 +96,7 @@ object NostrUserProfileDataSource : NostrDataSource("UserProfileFeed") {
|
|||||||
JsonFilter(
|
JsonFilter(
|
||||||
kinds = listOf(LnZapEvent.KIND),
|
kinds = listOf(LnZapEvent.KIND),
|
||||||
tags = mapOf("p" to listOf(it.pubkeyHex)),
|
tags = mapOf("p" to listOf(it.pubkeyHex)),
|
||||||
|
limit = 200,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -178,7 +179,6 @@ object NostrUserProfileDataSource : NostrDataSource("UserProfileFeed") {
|
|||||||
createAcceptedAwardsFilter(),
|
createAcceptedAwardsFilter(),
|
||||||
createReceivedAwardsFilter(),
|
createReceivedAwardsFilter(),
|
||||||
createBookmarksFilter(),
|
createBookmarksFilter(),
|
||||||
)
|
).ifEmpty { null }
|
||||||
.ifEmpty { null }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -55,5 +55,7 @@ object TimeUtils {
|
|||||||
|
|
||||||
fun oneWeekAgo() = now() - ONE_WEEK
|
fun oneWeekAgo() = now() - ONE_WEEK
|
||||||
|
|
||||||
|
fun oneMonthAgo() = now() - ONE_MONTH
|
||||||
|
|
||||||
fun randomWithTwoDays() = System.currentTimeMillis() / 1000 - CryptoUtils.randomInt(twoDays())
|
fun randomWithTwoDays() = System.currentTimeMillis() / 1000 - CryptoUtils.randomInt(twoDays())
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user