From 0fae8b4966ea052fe26f829680cb18de282ede58 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 11 Jul 2026 01:20:42 +0000 Subject: [PATCH] fix(concord): route taps on a Concord message to its channel RouteMaker resolved Marmot and NIP-29 relay-group channel gatherers to their chat screens but had no ConcordChannel branch, so tapping a Concord message (from the Messages inbox row, a quoted note, go-to-conversation) fell through to the generic thread view instead of opening the channel. Add the branch and a routeFor(ConcordChannel) mirroring routeFor(RelayGroupChannel). Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01CzJ2Cwo8tg4oZq43oRa3ig --- .../amethyst/ui/navigation/routes/RouteMaker.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/routes/RouteMaker.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/routes/RouteMaker.kt index 579b779d5b..aa713474c4 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/routes/RouteMaker.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/routes/RouteMaker.kt @@ -20,6 +20,7 @@ */ package com.vitorpamplona.amethyst.ui.navigation.routes +import com.vitorpamplona.amethyst.commons.model.concord.ConcordChannel import com.vitorpamplona.amethyst.commons.model.emphChat.EphemeralChatChannel import com.vitorpamplona.amethyst.commons.model.marmotGroups.MarmotGroupChatroom import com.vitorpamplona.amethyst.commons.model.nip28PublicChats.PublicChatChannel @@ -84,6 +85,14 @@ fun routeFor( return routeFor(relayGroup) } + // Concord channel content (kind 9 chat, 1111 reply, 7 reaction) lands in LocalCache as a real + // Note attached to its ConcordChannel gatherer. Like the relay-group case above, route to the + // Concord channel screen instead of the generic thread view it would otherwise fall through to. + val concordChannel = note.inGatherers?.firstNotNullOfOrNull { it as? ConcordChannel } + if (concordChannel != null) { + return routeFor(concordChannel) + } + val noteEvent = note.event ?: return Route.EventRedirect(note.idHex) if (noteEvent.isGroupScoped()) { @@ -282,6 +291,8 @@ fun routeFor(note: RelayGroupChannel): Route = Route.RelayGroup(note.groupId.id, fun routeFor(groupId: GroupId): Route = Route.RelayGroup(groupId.id, groupId.relayUrl.url) +fun routeFor(channel: ConcordChannel): Route = Route.Concord(channel.channelId.communityId, channel.channelId.channelId) + fun routeFor(user: User): Route.Profile = Route.Profile(user.pubkeyHex) fun routeForUser(userHex: HexKey): Route.Profile = Route.Profile(userHex)