- {/* Icon + Name */}
-
- {conversation.metadata?.icon && (
-

{
- // Hide image if it fails to load
- e.currentTarget.style.display = "none";
- }}
- />
- )}
-
- {conversation.title}
-
-
- {/* Description */}
- {conversation.metadata?.description && (
-
- {conversation.metadata.description}
-
- )}
- {/* Protocol Type - Clickable */}
-
- {(conversation.type === "group" ||
- conversation.type === "live-chat") && (
-
- )}
- {(conversation.type === "group" ||
- conversation.type === "live-chat") && (
- •
- )}
-
- {conversation.type}
-
-
- {/* Live Activity Status */}
- {liveActivity?.status && (
-
-
- Status:
+ <>
+
+
+ {/* Header with conversation info and controls */}
+
+
+
+ {headerPrefix}
+
+
+
+
+
+
+
+ {/* Icon + Name */}
+
+ {conversation.metadata?.icon && (
+

{
+ // Hide image if it fails to load
+ e.currentTarget.style.display = "none";
+ }}
+ />
+ )}
+
+ {conversation.title}
-
- )}
- {/* Host Info */}
- {liveActivity?.hostPubkey && (
-
-
Host:
-
+ {/* Description */}
+ {conversation.metadata?.description && (
+
+ {conversation.metadata.description}
+
+ )}
+ {/* Protocol Type - Clickable */}
+
+ {(conversation.type === "group" ||
+ conversation.type === "live-chat") && (
+
+ )}
+ {(conversation.type === "group" ||
+ conversation.type === "live-chat") && (
+ •
+ )}
+
+ {conversation.type}
+
- )}
-
-
-
-
-
-
-
-
- {(conversation.type === "group" ||
- conversation.type === "live-chat") && (
-
- )}
+ {/* Live Activity Status */}
+ {liveActivity?.status && (
+
+
+ Status:
+
+
+
+ )}
+ {/* Host Info */}
+ {liveActivity?.hostPubkey && (
+
+ Host:
+
+
+ )}
+
+
+
+
+
+
+
+
+ {(conversation.type === "group" ||
+ conversation.type === "live-chat") && (
+
+ )}
+
-
- {/* Message timeline with virtualization */}
-
- {messagesWithMarkers && messagesWithMarkers.length > 0 ? (
-
- hasMore && conversationResult.status === "success" ? (
-
-
+ );
+ }
return (
-
-
-
+
);
- }
- return (
-
- );
- }}
- style={{ height: "100%" }}
- />
+ }}
+ style={{ height: "100%" }}
+ />
+ ) : (
+
+ No messages yet. Start the conversation!
+
+ )}
+
+
+ {/* Message composer - only show if user has active account */}
+ {hasActiveAccount ? (
+
+ {replyTo && (
+
setReplyTo(undefined)}
+ />
+ )}
+
+
+
+
+
+
+
+
+
+ Attach media
+
+
+
+
{
+ if (content.trim()) {
+ handleSend(content, replyTo, emojiTags, blobAttachments);
+ }
+ }}
+ className="flex-1 min-w-0"
+ />
+ {
+ editorRef.current?.submit();
+ }}
+ >
+ {isSending ? (
+
+ ) : (
+ "Send"
+ )}
+
+
+ {uploadDialog}
+
) : (
-
- No messages yet. Start the conversation!
+
+ setShowLogin(true)}
+ >
+ Sign in to send messages
+
)}
-
- {/* Message composer - only show if user has active account */}
- {hasActiveAccount ? (
-
- {replyTo && (
-
setReplyTo(undefined)}
- />
- )}
-
-
-
-
-
-
-
-
-
- Attach media
-
-
-
-
{
- if (content.trim()) {
- handleSend(content, replyTo, emojiTags, blobAttachments);
- }
- }}
- className="flex-1 min-w-0"
- />
- {
- editorRef.current?.submit();
- }}
- >
- {isSending ? : "Send"}
-
-
- {uploadDialog}
-
- ) : (
-
- Sign in to send messages
-
- )}
-
+ >
);
}
diff --git a/src/lib/chat/adapters/nip-29-adapter.ts b/src/lib/chat/adapters/nip-29-adapter.ts
index a4dcc30..3e50f46 100644
--- a/src/lib/chat/adapters/nip-29-adapter.ts
+++ b/src/lib/chat/adapters/nip-29-adapter.ts
@@ -116,11 +116,6 @@ export class Nip29Adapter extends ChatProtocolAdapter {
throw new Error("NIP-29 groups require a relay URL");
}
- const activePubkey = accountManager.active$.value?.pubkey;
- if (!activePubkey) {
- throw new Error("No active account");
- }
-
console.log(
`[NIP-29] Fetching group metadata for ${groupId} from ${relayUrl}`,
);
diff --git a/src/lib/chat/adapters/nip-53-adapter.ts b/src/lib/chat/adapters/nip-53-adapter.ts
index 54dba8f..b943acd 100644
--- a/src/lib/chat/adapters/nip-53-adapter.ts
+++ b/src/lib/chat/adapters/nip-53-adapter.ts
@@ -93,11 +93,6 @@ export class Nip53Adapter extends ChatProtocolAdapter {
const { pubkey, identifier: dTag } = identifier.value;
const relayHints = identifier.relays || [];
- const activePubkey = accountManager.active$.value?.pubkey;
- if (!activePubkey) {
- throw new Error("No active account");
- }
-
console.log(
`[NIP-53] Fetching live activity ${dTag} by ${pubkey.slice(0, 8)}...`,
);