mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-10-10 15:33:40 +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,
|
"a" to communityList,
|
||||||
"k" to listOf(LongTextNoteEvent.KIND.toString()),
|
"k" to listOf(LongTextNoteEvent.KIND.toString()),
|
||||||
),
|
),
|
||||||
limit = 300,
|
limit = 30,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -58,7 +58,7 @@ fun filterLongFormAllCommunities(
|
|||||||
Filter(
|
Filter(
|
||||||
tags = mapOf("k" to listOf("5300"), "a" to communityList),
|
tags = mapOf("k" to listOf("5300"), "a" to communityList),
|
||||||
kinds = listOf(LongTextNoteEvent.KIND),
|
kinds = listOf(LongTextNoteEvent.KIND),
|
||||||
limit = 300,
|
limit = 30,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -42,7 +42,7 @@ fun filterLongFormAuthors(
|
|||||||
Filter(
|
Filter(
|
||||||
authors = authorList,
|
authors = authorList,
|
||||||
kinds = listOf(LongTextNoteEvent.KIND),
|
kinds = listOf(LongTextNoteEvent.KIND),
|
||||||
limit = 300,
|
limit = 30,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -48,7 +48,7 @@ fun filterLongFormByCommunity(
|
|||||||
"a" to listOf(community),
|
"a" to listOf(community),
|
||||||
"k" to listOf(LongTextNoteEvent.KIND.toString()),
|
"k" to listOf(LongTextNoteEvent.KIND.toString()),
|
||||||
),
|
),
|
||||||
limit = 300,
|
limit = 30,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -60,7 +60,7 @@ fun filterLongFormByCommunity(
|
|||||||
authors = authors,
|
authors = authors,
|
||||||
tags = mapOf("k" to listOf("5300"), "a" to listOf(community)),
|
tags = mapOf("k" to listOf("5300"), "a" to listOf(community)),
|
||||||
kinds = listOf(LongTextNoteEvent.KIND),
|
kinds = listOf(LongTextNoteEvent.KIND),
|
||||||
limit = 300,
|
limit = 30,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -44,7 +44,7 @@ fun filterLongFormByGeohash(
|
|||||||
Filter(
|
Filter(
|
||||||
kinds = listOf(LongTextNoteEvent.KIND),
|
kinds = listOf(LongTextNoteEvent.KIND),
|
||||||
tags = mapOf("g" to geoHashes),
|
tags = mapOf("g" to geoHashes),
|
||||||
limit = 300,
|
limit = 30,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -44,7 +44,7 @@ fun filterLongFormByHashtag(
|
|||||||
Filter(
|
Filter(
|
||||||
kinds = listOf(LongTextNoteEvent.KIND),
|
kinds = listOf(LongTextNoteEvent.KIND),
|
||||||
tags = mapOf("t" to hashtags),
|
tags = mapOf("t" to hashtags),
|
||||||
limit = 300,
|
limit = 30,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -39,7 +39,7 @@ fun filterLongFormGlobal(
|
|||||||
filter =
|
filter =
|
||||||
Filter(
|
Filter(
|
||||||
kinds = listOf(LongTextNoteEvent.KIND),
|
kinds = listOf(LongTextNoteEvent.KIND),
|
||||||
limit = 300,
|
limit = 30,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@@ -46,7 +46,7 @@ fun filterPublicChatsGlobal(
|
|||||||
ChannelMetadataEvent.KIND,
|
ChannelMetadataEvent.KIND,
|
||||||
ChannelMessageEvent.KIND,
|
ChannelMessageEvent.KIND,
|
||||||
),
|
),
|
||||||
limit = 300,
|
limit = 30,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@@ -39,7 +39,7 @@ fun filterFollowSetsGlobal(
|
|||||||
filter =
|
filter =
|
||||||
Filter(
|
Filter(
|
||||||
kinds = listOf(FollowListEvent.KIND),
|
kinds = listOf(FollowListEvent.KIND),
|
||||||
limit = 300,
|
limit = 30,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@@ -40,7 +40,7 @@ fun filterLiveActivitiesGlobal(
|
|||||||
filter =
|
filter =
|
||||||
Filter(
|
Filter(
|
||||||
kinds = listOf(LiveActivitiesChatMessageEvent.KIND, LiveActivitiesEvent.KIND),
|
kinds = listOf(LiveActivitiesChatMessageEvent.KIND, LiveActivitiesEvent.KIND),
|
||||||
limit = 300,
|
limit = 30,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@@ -44,7 +44,7 @@ fun filterCommunitiesByGeohash(
|
|||||||
Filter(
|
Filter(
|
||||||
kinds = listOf(CommunityDefinitionEvent.KIND, CommunityPostApprovalEvent.KIND),
|
kinds = listOf(CommunityDefinitionEvent.KIND, CommunityPostApprovalEvent.KIND),
|
||||||
tags = mapOf("g" to geoHashes),
|
tags = mapOf("g" to geoHashes),
|
||||||
limit = 300,
|
limit = 100,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -45,7 +45,7 @@ fun filterCommunitiesByHashtag(
|
|||||||
Filter(
|
Filter(
|
||||||
kinds = listOf(CommunityDefinitionEvent.KIND, CommunityPostApprovalEvent.KIND),
|
kinds = listOf(CommunityDefinitionEvent.KIND, CommunityPostApprovalEvent.KIND),
|
||||||
tags = mapOf("t" to hashtags),
|
tags = mapOf("t" to hashtags),
|
||||||
limit = 300,
|
limit = 100,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -41,7 +41,7 @@ fun filterCommunitiesGlobal(
|
|||||||
filter =
|
filter =
|
||||||
Filter(
|
Filter(
|
||||||
kinds = listOf(CommunityDefinitionEvent.KIND, CommunityPostApprovalEvent.KIND),
|
kinds = listOf(CommunityDefinitionEvent.KIND, CommunityPostApprovalEvent.KIND),
|
||||||
limit = 300,
|
limit = 30,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -41,7 +41,7 @@ fun filterContentDVMsGlobal(
|
|||||||
Filter(
|
Filter(
|
||||||
kinds = listOf(AppDefinitionEvent.KIND),
|
kinds = listOf(AppDefinitionEvent.KIND),
|
||||||
tags = mapOf("k" to listOf("5300")),
|
tags = mapOf("k" to listOf("5300")),
|
||||||
limit = 300,
|
limit = 30,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -40,7 +40,7 @@ fun filterClassifiedsGlobal(
|
|||||||
filter =
|
filter =
|
||||||
Filter(
|
Filter(
|
||||||
kinds = listOf(ClassifiedsEvent.KIND),
|
kinds = listOf(ClassifiedsEvent.KIND),
|
||||||
limit = 300,
|
limit = 30,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -78,7 +78,7 @@ fun filterHomePostsFromCommunity(
|
|||||||
"a" to listOf(community),
|
"a" to listOf(community),
|
||||||
"k" to HomePostsFromCommunityKindsStr,
|
"k" to HomePostsFromCommunityKindsStr,
|
||||||
),
|
),
|
||||||
limit = 200,
|
limit = 100,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -90,7 +90,7 @@ fun filterHomePostsFromCommunity(
|
|||||||
authors = authors,
|
authors = authors,
|
||||||
tags = mapOf("a" to listOf(community)),
|
tags = mapOf("a" to listOf(community)),
|
||||||
kinds = HomePostsFromCommunityKinds,
|
kinds = HomePostsFromCommunityKinds,
|
||||||
limit = 200,
|
limit = 100,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -43,7 +43,7 @@ fun filterPictureAndVideoGeohash(
|
|||||||
Filter(
|
Filter(
|
||||||
kinds = PictureAndVideoKinds,
|
kinds = PictureAndVideoKinds,
|
||||||
tags = mapOf("g" to geoHashes),
|
tags = mapOf("g" to geoHashes),
|
||||||
limit = 400,
|
limit = 100,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -57,7 +57,7 @@ fun filterPictureAndVideoGeohash(
|
|||||||
"g" to geoHashes,
|
"g" to geoHashes,
|
||||||
"m" to LegacyMimeTypes,
|
"m" to LegacyMimeTypes,
|
||||||
),
|
),
|
||||||
limit = 200,
|
limit = 100,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -44,7 +44,7 @@ fun filterPictureAndVideoHashtag(
|
|||||||
Filter(
|
Filter(
|
||||||
kinds = PictureAndVideoKinds,
|
kinds = PictureAndVideoKinds,
|
||||||
tags = mapOf("t" to hashtags),
|
tags = mapOf("t" to hashtags),
|
||||||
limit = 400,
|
limit = 50,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -58,7 +58,7 @@ fun filterPictureAndVideoHashtag(
|
|||||||
"t" to hashtags,
|
"t" to hashtags,
|
||||||
"m" to LegacyMimeTypes,
|
"m" to LegacyMimeTypes,
|
||||||
),
|
),
|
||||||
limit = 200,
|
limit = 50,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -42,7 +42,7 @@ fun filterPictureAndVideoGlobal(
|
|||||||
filter =
|
filter =
|
||||||
Filter(
|
Filter(
|
||||||
kinds = PictureAndVideoKinds,
|
kinds = PictureAndVideoKinds,
|
||||||
limit = 200,
|
limit = 100,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -52,7 +52,7 @@ fun filterPictureAndVideoGlobal(
|
|||||||
Filter(
|
Filter(
|
||||||
kinds = PictureAndVideoLegacyKinds,
|
kinds = PictureAndVideoLegacyKinds,
|
||||||
tags = LegacyMimeTypeMap,
|
tags = LegacyMimeTypeMap,
|
||||||
limit = 200,
|
limit = 100,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -44,7 +44,7 @@ fun filterPictureAndVideoAuthors(
|
|||||||
Filter(
|
Filter(
|
||||||
authors = authorList,
|
authors = authorList,
|
||||||
kinds = PictureAndVideoKinds,
|
kinds = PictureAndVideoKinds,
|
||||||
limit = 400,
|
limit = 100,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -55,7 +55,7 @@ fun filterPictureAndVideoAuthors(
|
|||||||
authors = authorList,
|
authors = authorList,
|
||||||
kinds = PictureAndVideoLegacyKinds,
|
kinds = PictureAndVideoLegacyKinds,
|
||||||
tags = LegacyMimeTypeMap,
|
tags = LegacyMimeTypeMap,
|
||||||
limit = 200,
|
limit = 100,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -52,7 +52,7 @@ fun filterPictureAndVideoAllCommunities(
|
|||||||
"a" to communityList,
|
"a" to communityList,
|
||||||
"k" to PictureAndVideoKTags,
|
"k" to PictureAndVideoKTags,
|
||||||
),
|
),
|
||||||
limit = 300,
|
limit = 100,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -63,7 +63,7 @@ fun filterPictureAndVideoAllCommunities(
|
|||||||
Filter(
|
Filter(
|
||||||
tags = mapOf("a" to communityList),
|
tags = mapOf("a" to communityList),
|
||||||
kinds = PictureAndVideoKinds,
|
kinds = PictureAndVideoKinds,
|
||||||
limit = 300,
|
limit = 100,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -78,7 +78,7 @@ fun filterPictureAndVideoAllCommunities(
|
|||||||
"a" to communityList,
|
"a" to communityList,
|
||||||
"k" to listOf(FileHeaderEvent.KIND.toString(), FileStorageHeaderEvent.KIND.toString()),
|
"k" to listOf(FileHeaderEvent.KIND.toString(), FileStorageHeaderEvent.KIND.toString()),
|
||||||
),
|
),
|
||||||
limit = 300,
|
limit = 100,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -93,7 +93,7 @@ fun filterPictureAndVideoAllCommunities(
|
|||||||
"m" to LegacyMimeTypes,
|
"m" to LegacyMimeTypes,
|
||||||
),
|
),
|
||||||
kinds = PictureAndVideoLegacyKinds,
|
kinds = PictureAndVideoLegacyKinds,
|
||||||
limit = 300,
|
limit = 100,
|
||||||
since = since,
|
since = since,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user