mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-28 21:43:19 +02:00
Significantly reduces the limit in our filters to reduce the amount of duplicated events coming from multiple relays.
This commit is contained in:
@@ -47,7 +47,7 @@ fun filterLongFormAllCommunities(
|
||||
"a" to communityList,
|
||||
"k" to listOf(LongTextNoteEvent.KIND.toString()),
|
||||
),
|
||||
limit = 300,
|
||||
limit = 30,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
@@ -58,7 +58,7 @@ fun filterLongFormAllCommunities(
|
||||
Filter(
|
||||
tags = mapOf("k" to listOf("5300"), "a" to communityList),
|
||||
kinds = listOf(LongTextNoteEvent.KIND),
|
||||
limit = 300,
|
||||
limit = 30,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
@@ -42,7 +42,7 @@ fun filterLongFormAuthors(
|
||||
Filter(
|
||||
authors = authorList,
|
||||
kinds = listOf(LongTextNoteEvent.KIND),
|
||||
limit = 300,
|
||||
limit = 30,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
@@ -48,7 +48,7 @@ fun filterLongFormByCommunity(
|
||||
"a" to listOf(community),
|
||||
"k" to listOf(LongTextNoteEvent.KIND.toString()),
|
||||
),
|
||||
limit = 300,
|
||||
limit = 30,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
@@ -60,7 +60,7 @@ fun filterLongFormByCommunity(
|
||||
authors = authors,
|
||||
tags = mapOf("k" to listOf("5300"), "a" to listOf(community)),
|
||||
kinds = listOf(LongTextNoteEvent.KIND),
|
||||
limit = 300,
|
||||
limit = 30,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
@@ -44,7 +44,7 @@ fun filterLongFormByGeohash(
|
||||
Filter(
|
||||
kinds = listOf(LongTextNoteEvent.KIND),
|
||||
tags = mapOf("g" to geoHashes),
|
||||
limit = 300,
|
||||
limit = 30,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
@@ -44,7 +44,7 @@ fun filterLongFormByHashtag(
|
||||
Filter(
|
||||
kinds = listOf(LongTextNoteEvent.KIND),
|
||||
tags = mapOf("t" to hashtags),
|
||||
limit = 300,
|
||||
limit = 30,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
@@ -39,7 +39,7 @@ fun filterLongFormGlobal(
|
||||
filter =
|
||||
Filter(
|
||||
kinds = listOf(LongTextNoteEvent.KIND),
|
||||
limit = 300,
|
||||
limit = 30,
|
||||
since = since,
|
||||
),
|
||||
)
|
||||
|
@@ -46,7 +46,7 @@ fun filterPublicChatsGlobal(
|
||||
ChannelMetadataEvent.KIND,
|
||||
ChannelMessageEvent.KIND,
|
||||
),
|
||||
limit = 300,
|
||||
limit = 30,
|
||||
since = since,
|
||||
),
|
||||
)
|
||||
|
@@ -39,7 +39,7 @@ fun filterFollowSetsGlobal(
|
||||
filter =
|
||||
Filter(
|
||||
kinds = listOf(FollowListEvent.KIND),
|
||||
limit = 300,
|
||||
limit = 30,
|
||||
since = since,
|
||||
),
|
||||
)
|
||||
|
@@ -40,7 +40,7 @@ fun filterLiveActivitiesGlobal(
|
||||
filter =
|
||||
Filter(
|
||||
kinds = listOf(LiveActivitiesChatMessageEvent.KIND, LiveActivitiesEvent.KIND),
|
||||
limit = 300,
|
||||
limit = 30,
|
||||
since = since,
|
||||
),
|
||||
)
|
||||
|
@@ -44,7 +44,7 @@ fun filterCommunitiesByGeohash(
|
||||
Filter(
|
||||
kinds = listOf(CommunityDefinitionEvent.KIND, CommunityPostApprovalEvent.KIND),
|
||||
tags = mapOf("g" to geoHashes),
|
||||
limit = 300,
|
||||
limit = 100,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
@@ -45,7 +45,7 @@ fun filterCommunitiesByHashtag(
|
||||
Filter(
|
||||
kinds = listOf(CommunityDefinitionEvent.KIND, CommunityPostApprovalEvent.KIND),
|
||||
tags = mapOf("t" to hashtags),
|
||||
limit = 300,
|
||||
limit = 100,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
@@ -41,7 +41,7 @@ fun filterCommunitiesGlobal(
|
||||
filter =
|
||||
Filter(
|
||||
kinds = listOf(CommunityDefinitionEvent.KIND, CommunityPostApprovalEvent.KIND),
|
||||
limit = 300,
|
||||
limit = 30,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
@@ -41,7 +41,7 @@ fun filterContentDVMsGlobal(
|
||||
Filter(
|
||||
kinds = listOf(AppDefinitionEvent.KIND),
|
||||
tags = mapOf("k" to listOf("5300")),
|
||||
limit = 300,
|
||||
limit = 30,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
@@ -40,7 +40,7 @@ fun filterClassifiedsGlobal(
|
||||
filter =
|
||||
Filter(
|
||||
kinds = listOf(ClassifiedsEvent.KIND),
|
||||
limit = 300,
|
||||
limit = 30,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
@@ -78,7 +78,7 @@ fun filterHomePostsFromCommunity(
|
||||
"a" to listOf(community),
|
||||
"k" to HomePostsFromCommunityKindsStr,
|
||||
),
|
||||
limit = 200,
|
||||
limit = 100,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
@@ -90,7 +90,7 @@ fun filterHomePostsFromCommunity(
|
||||
authors = authors,
|
||||
tags = mapOf("a" to listOf(community)),
|
||||
kinds = HomePostsFromCommunityKinds,
|
||||
limit = 200,
|
||||
limit = 100,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
@@ -43,7 +43,7 @@ fun filterPictureAndVideoGeohash(
|
||||
Filter(
|
||||
kinds = PictureAndVideoKinds,
|
||||
tags = mapOf("g" to geoHashes),
|
||||
limit = 400,
|
||||
limit = 100,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
@@ -57,7 +57,7 @@ fun filterPictureAndVideoGeohash(
|
||||
"g" to geoHashes,
|
||||
"m" to LegacyMimeTypes,
|
||||
),
|
||||
limit = 200,
|
||||
limit = 100,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
@@ -44,7 +44,7 @@ fun filterPictureAndVideoHashtag(
|
||||
Filter(
|
||||
kinds = PictureAndVideoKinds,
|
||||
tags = mapOf("t" to hashtags),
|
||||
limit = 400,
|
||||
limit = 50,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
@@ -58,7 +58,7 @@ fun filterPictureAndVideoHashtag(
|
||||
"t" to hashtags,
|
||||
"m" to LegacyMimeTypes,
|
||||
),
|
||||
limit = 200,
|
||||
limit = 50,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
@@ -42,7 +42,7 @@ fun filterPictureAndVideoGlobal(
|
||||
filter =
|
||||
Filter(
|
||||
kinds = PictureAndVideoKinds,
|
||||
limit = 200,
|
||||
limit = 100,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
@@ -52,7 +52,7 @@ fun filterPictureAndVideoGlobal(
|
||||
Filter(
|
||||
kinds = PictureAndVideoLegacyKinds,
|
||||
tags = LegacyMimeTypeMap,
|
||||
limit = 200,
|
||||
limit = 100,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
@@ -44,7 +44,7 @@ fun filterPictureAndVideoAuthors(
|
||||
Filter(
|
||||
authors = authorList,
|
||||
kinds = PictureAndVideoKinds,
|
||||
limit = 400,
|
||||
limit = 100,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
@@ -55,7 +55,7 @@ fun filterPictureAndVideoAuthors(
|
||||
authors = authorList,
|
||||
kinds = PictureAndVideoLegacyKinds,
|
||||
tags = LegacyMimeTypeMap,
|
||||
limit = 200,
|
||||
limit = 100,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
@@ -52,7 +52,7 @@ fun filterPictureAndVideoAllCommunities(
|
||||
"a" to communityList,
|
||||
"k" to PictureAndVideoKTags,
|
||||
),
|
||||
limit = 300,
|
||||
limit = 100,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
@@ -63,7 +63,7 @@ fun filterPictureAndVideoAllCommunities(
|
||||
Filter(
|
||||
tags = mapOf("a" to communityList),
|
||||
kinds = PictureAndVideoKinds,
|
||||
limit = 300,
|
||||
limit = 100,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
@@ -78,7 +78,7 @@ fun filterPictureAndVideoAllCommunities(
|
||||
"a" to communityList,
|
||||
"k" to listOf(FileHeaderEvent.KIND.toString(), FileStorageHeaderEvent.KIND.toString()),
|
||||
),
|
||||
limit = 300,
|
||||
limit = 100,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
@@ -93,7 +93,7 @@ fun filterPictureAndVideoAllCommunities(
|
||||
"m" to LegacyMimeTypes,
|
||||
),
|
||||
kinds = PictureAndVideoLegacyKinds,
|
||||
limit = 300,
|
||||
limit = 100,
|
||||
since = since,
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user