diff --git a/src/components/ChatViewer.tsx b/src/components/ChatViewer.tsx index af29920..2ed0376 100644 --- a/src/components/ChatViewer.tsx +++ b/src/components/ChatViewer.tsx @@ -26,6 +26,7 @@ import type { import { CHAT_KINDS } from "@/types/chat"; // import { NipC7Adapter } from "@/lib/chat/adapters/nip-c7-adapter"; // Coming soon import { Nip10Adapter } from "@/lib/chat/adapters/nip-10-adapter"; +import { Nip22Adapter } from "@/lib/chat/adapters/nip-22-adapter"; import { Nip29Adapter } from "@/lib/chat/adapters/nip-29-adapter"; import { Nip53Adapter } from "@/lib/chat/adapters/nip-53-adapter"; import type { ChatProtocolAdapter } from "@/lib/chat/adapters/base-adapter"; @@ -41,6 +42,7 @@ import { RelaysDropdown } from "./chat/RelaysDropdown"; import { MessageReactions } from "./chat/MessageReactions"; import { StatusBadge } from "./live/StatusBadge"; import { ChatMessageContextMenu } from "./chat/ChatMessageContextMenu"; +import { KindRenderer } from "./nostr/kinds"; import { useGrimoire } from "@/core/state"; import { Button } from "./ui/button"; import LoginDialog from "./nostr/LoginDialog"; @@ -278,6 +280,18 @@ const MessageItem = memo(function MessageItem({ [conversation], ); + // NIP-22 root messages: render with KindRenderer for proper event display + if (conversation.protocol === "nip-22" && message.metadata?.isRootMessage) { + return ( +
+
+ Commenting on: +
+ +
+ ); + } + // System messages (join/leave) have special styling if (message.type === "system") { return ( @@ -999,7 +1013,8 @@ export function ChatViewer({ Header: () => hasMore && conversationResult.status === "success" && - protocol !== "nip-10" ? ( + protocol !== "nip-10" && + protocol !== "nip-22" ? (