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 */}