From a8d150197931d63e56c5a61f6cb14ca4e13326af Mon Sep 17 00:00:00 2001 From: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@sprout-oss.stage.blox.sqprod.co> Date: Tue, 30 Jun 2026 17:01:29 -0700 Subject: [PATCH] fix(sidebar): use declared owner helper for working pill Co-authored-by: Taylor Ho Signed-off-by: Taylor Ho --- .../src/features/sidebar/lib/useActiveWorkingChannelsById.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/desktop/src/features/sidebar/lib/useActiveWorkingChannelsById.ts b/desktop/src/features/sidebar/lib/useActiveWorkingChannelsById.ts index ec514c7c5b..fd01026168 100644 --- a/desktop/src/features/sidebar/lib/useActiveWorkingChannelsById.ts +++ b/desktop/src/features/sidebar/lib/useActiveWorkingChannelsById.ts @@ -11,6 +11,7 @@ import { } from "@/features/agents/hooks"; import { useManagedAgentObserverBridge } from "@/features/agents/observerRelayStore"; import { useUsersBatchQuery } from "@/features/profile/hooks"; +import { ownsAuthorAgent } from "@/features/profile/lib/identity"; import { useIdentityQuery } from "@/shared/api/hooks"; import type { ManagedAgent, @@ -49,11 +50,9 @@ export function getOwnedRelayWorkingAgents( ): OwnedRelayWorkingAgent[] { if (!currentPubkey) return []; - const normalizedCurrentPubkey = normalizePubkey(currentPubkey); return relayAgents.flatMap((agent) => { const profile = profiles?.[normalizePubkey(agent.pubkey)]; - if (!profile?.ownerPubkey) return []; - if (normalizePubkey(profile.ownerPubkey) !== normalizedCurrentPubkey) { + if (!ownsAuthorAgent(profile, currentPubkey)) { return []; }