mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-02 04:56:14 +00:00
feat(relays): name which public chats each subscription serves
Public Chat collapsed into a single unnamed row because none of its producers carried an entity id, so the screen could say how many filters were running but not which chats caused them. The six channel-scoped producers now tag their channel ids — including the batched ones, which carry every channel a relay serves so the screen fans them into a row each. The six discovery producers (global, by author, by community, by hashtag, by geohash) stay untagged on purpose: they search for chats rather than serving known ones, so there is no entity to name. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
5f6d09425d
commit
4f1bd6e0c2
+1
@@ -57,6 +57,7 @@ fun filterMissingChannelsById(keys: List<ChannelFinderQueryState>): List<RelayBa
|
||||
filter =
|
||||
ExplainedFilter(
|
||||
purpose = SubPurpose.PUBLIC_CHATS,
|
||||
entityIds = channelIds.sorted(),
|
||||
kinds = filterMissingPublicChannelsByIdKinds,
|
||||
ids = channelIds.sorted(),
|
||||
),
|
||||
|
||||
+1
@@ -40,6 +40,7 @@ fun filterChannelMetadataUpdatesById(
|
||||
filter =
|
||||
ExplainedFilter(
|
||||
purpose = SubPurpose.PUBLIC_CHATS,
|
||||
entityIds = channels.map { it.idHex }.sorted(),
|
||||
kinds = channelMetadataKinds,
|
||||
tags = mapOf("e" to channels.map { it.idHex }),
|
||||
since = since,
|
||||
|
||||
+1
@@ -37,6 +37,7 @@ fun filterMessagesToPublicChat(
|
||||
filter =
|
||||
ExplainedFilter(
|
||||
purpose = SubPurpose.PUBLIC_CHATS,
|
||||
entityIds = listOfNotNull(channel.idHex),
|
||||
kinds = listOf(ChannelMessageEvent.KIND),
|
||||
tags = mapOf("e" to listOfNotNull(channel.idHex)),
|
||||
limit = 200,
|
||||
|
||||
+1
@@ -39,6 +39,7 @@ fun filterMyMessagesToPublicChat(
|
||||
filter =
|
||||
ExplainedFilter(
|
||||
purpose = SubPurpose.PUBLIC_CHATS,
|
||||
entityIds = listOfNotNull(channel.idHex),
|
||||
kinds = listOf(ChannelMessageEvent.KIND),
|
||||
tags = mapOf("e" to listOfNotNull(channel.idHex)),
|
||||
authors = listOf(pubKey),
|
||||
|
||||
+1
@@ -59,6 +59,7 @@ fun filterFollowingPublicChatsCreationEvent(
|
||||
filter =
|
||||
ExplainedFilter(
|
||||
purpose = SubPurpose.PUBLIC_CHATS,
|
||||
entityIds = it.value.sorted(),
|
||||
kinds = listOf(ChannelCreateEvent.KIND),
|
||||
ids = it.value.sorted(),
|
||||
since = since?.get(it.key)?.time,
|
||||
|
||||
+2
@@ -60,6 +60,7 @@ fun filterLastMessageFollowingPublicChats(
|
||||
filter =
|
||||
ExplainedFilter(
|
||||
purpose = SubPurpose.PUBLIC_CHATS,
|
||||
entityIds = it.value.sorted(),
|
||||
kinds = listOf(ChannelMetadataEvent.KIND),
|
||||
tags = mapOf("e" to it.value.sorted()),
|
||||
since = since?.get(it.key)?.time,
|
||||
@@ -71,6 +72,7 @@ fun filterLastMessageFollowingPublicChats(
|
||||
filter =
|
||||
ExplainedFilter(
|
||||
purpose = SubPurpose.PUBLIC_CHATS,
|
||||
entityIds = it.value.sorted(),
|
||||
kinds = listOf(ChannelMessageEvent.KIND),
|
||||
tags = mapOf("e" to it.value.sorted()),
|
||||
since = since?.get(it.key)?.time,
|
||||
|
||||
Reference in New Issue
Block a user