mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-11-10 23:26:49 +01:00
Limits the number of posts coming from big relays with too many authors to 500 max
This commit is contained in:
@@ -42,7 +42,7 @@ import com.vitorpamplona.quartz.nip84Highlights.HighlightEvent
|
||||
import com.vitorpamplona.quartz.nip99Classifieds.ClassifiedsEvent
|
||||
import com.vitorpamplona.quartz.nipA0VoiceMessages.VoiceEvent
|
||||
import com.vitorpamplona.quartz.nipA0VoiceMessages.VoiceReplyEvent
|
||||
import kotlin.math.max
|
||||
import kotlin.math.min
|
||||
|
||||
val HomePostsNewThreadKinds =
|
||||
listOf(
|
||||
@@ -81,7 +81,7 @@ fun filterNewHomePostsByAuthors(
|
||||
Filter(
|
||||
kinds = HomePostsNewThreadKinds,
|
||||
authors = authorList,
|
||||
limit = max(authorList.size * 10, 300),
|
||||
limit = min(authorList.size * 10, 500),
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
@@ -102,7 +102,7 @@ fun filterReplyHomePostsByAuthors(
|
||||
Filter(
|
||||
kinds = HomePostsConversationKinds,
|
||||
authors = authorList,
|
||||
limit = max(authorList.size * 10, 300),
|
||||
limit = min(authorList.size * 10, 500),
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user