Skip to content

Commit

Permalink
Limits the amount of zaps on the user profile
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorpamplona committed Jun 20, 2024
1 parent 9e9e066 commit b39ac21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ object NostrUserProfileDataSource : NostrDataSource("UserProfileFeed") {
JsonFilter(
kinds = listOf(LnZapEvent.KIND),
tags = mapOf("p" to listOf(it.pubkeyHex)),
limit = 200,
),
)
}
Expand Down Expand Up @@ -178,7 +179,6 @@ object NostrUserProfileDataSource : NostrDataSource("UserProfileFeed") {
createAcceptedAwardsFilter(),
createReceivedAwardsFilter(),
createBookmarksFilter(),
)
.ifEmpty { null }
).ifEmpty { null }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,7 @@ object TimeUtils {

fun oneWeekAgo() = now() - ONE_WEEK

fun oneMonthAgo() = now() - ONE_MONTH

fun randomWithTwoDays() = System.currentTimeMillis() / 1000 - CryptoUtils.randomInt(twoDays())
}

0 comments on commit b39ac21

Please sign in to comment.