Breaks down the amount of reactions for each post to download from the amount of reactions to communities and chats themselves (which is much larger)
This commit is contained in:
+17
-2
@@ -36,7 +36,7 @@ import com.vitorpamplona.quartz.nip57Zaps.LnZapEvent
|
|||||||
import com.vitorpamplona.quartz.nip72ModCommunities.approval.CommunityPostApprovalEvent
|
import com.vitorpamplona.quartz.nip72ModCommunities.approval.CommunityPostApprovalEvent
|
||||||
import com.vitorpamplona.quartz.utils.mapOfSet
|
import com.vitorpamplona.quartz.utils.mapOfSet
|
||||||
|
|
||||||
val RepliesAndReactiionsToAddressesKinds1 =
|
val RepliesAndReactionsToAddressesKinds1 =
|
||||||
listOf(
|
listOf(
|
||||||
TextNoteEvent.KIND,
|
TextNoteEvent.KIND,
|
||||||
ReactionEvent.KIND,
|
ReactionEvent.KIND,
|
||||||
@@ -45,6 +45,10 @@ val RepliesAndReactiionsToAddressesKinds1 =
|
|||||||
ReportEvent.KIND,
|
ReportEvent.KIND,
|
||||||
LnZapEvent.KIND,
|
LnZapEvent.KIND,
|
||||||
PollNoteEvent.KIND,
|
PollNoteEvent.KIND,
|
||||||
|
)
|
||||||
|
|
||||||
|
val PostsAndChatMessagesToAddresses =
|
||||||
|
listOf(
|
||||||
CommunityPostApprovalEvent.KIND,
|
CommunityPostApprovalEvent.KIND,
|
||||||
LiveActivitiesChatMessageEvent.KIND,
|
LiveActivitiesChatMessageEvent.KIND,
|
||||||
)
|
)
|
||||||
@@ -80,13 +84,24 @@ fun filterRepliesAndReactionsToAddresses(
|
|||||||
relay = relay,
|
relay = relay,
|
||||||
filter =
|
filter =
|
||||||
Filter(
|
Filter(
|
||||||
kinds = RepliesAndReactiionsToAddressesKinds1,
|
kinds = RepliesAndReactionsToAddressesKinds1,
|
||||||
tags = mapOf("a" to sortedList),
|
tags = mapOf("a" to sortedList),
|
||||||
since = since,
|
since = since,
|
||||||
// Max amount of "replies" to download on a specific event.
|
// Max amount of "replies" to download on a specific event.
|
||||||
limit = 1000,
|
limit = 1000,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
RelayBasedFilter(
|
||||||
|
relay = relay,
|
||||||
|
filter =
|
||||||
|
Filter(
|
||||||
|
kinds = PostsAndChatMessagesToAddresses,
|
||||||
|
tags = mapOf("a" to sortedList),
|
||||||
|
since = since,
|
||||||
|
// Max amount of "replies" to download on a specific event.
|
||||||
|
limit = 100,
|
||||||
|
),
|
||||||
|
),
|
||||||
RelayBasedFilter(
|
RelayBasedFilter(
|
||||||
relay = relay,
|
relay = relay,
|
||||||
filter =
|
filter =
|
||||||
|
|||||||
Reference in New Issue
Block a user