From 6fbb3d055a068ec9959f866ff052c82c4a1c388f Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 12 Jan 2026 12:58:25 +0000 Subject: [PATCH] fix: always show chat button in CommunikeyViewer, fix chat props --- src/components/CommunikeyViewer.tsx | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/components/CommunikeyViewer.tsx b/src/components/CommunikeyViewer.tsx index 4b5e1c1..5db33a9 100644 --- a/src/components/CommunikeyViewer.tsx +++ b/src/components/CommunikeyViewer.tsx @@ -109,16 +109,20 @@ export function CommunikeyViewer({ pubkey, relays }: CommunikeyViewerProps) { : undefined; const tos = communityEvent ? getCommunikeyTos(communityEvent) : undefined; - // Check if chat is supported (kind 9 in any section) - const hasChat = contentSections.some((section) => section.kinds.includes(9)); - // Generate npub for copying const npub = resolvedPubkey ? nip19.npubEncode(resolvedPubkey) : ""; // Open chat for this community const openChat = () => { if (resolvedPubkey) { - addWindow("chat", { identifier: npub }); + addWindow("chat", { + protocol: "communikeys", + identifier: { + type: "communikey", + value: resolvedPubkey, + relays: communityRelays, + }, + }); } }; @@ -209,12 +213,10 @@ export function CommunikeyViewer({ pubkey, relays }: CommunikeyViewerProps) { - {hasChat && ( - - )} + {/* Description */}