From 5d8b0fa3ec3d77ba1a716f3ed4fcfa9907c96aab Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 19 Jan 2026 08:34:39 +0000 Subject: [PATCH] fix: pass full zap request event to RichText for proper parsing Previously, only the content string was passed to RichText when rendering zap comments. This prevented proper parsing of mentions, event references, hashtags, URLs, custom emojis, and other rich content features. Now passing the full zapRequest event object to RichText, enabling all content transformers to work correctly on zap comments. Changes: - Remove zapComment variable that extracted just the content string - Pass zapRequest event directly to RichText component - Update condition to check zapRequest && zapRequest.content Fixes rendering in both feed and detail views (detail falls back to feed renderer for kind 9735). --- src/components/nostr/kinds/ZapReceiptRenderer.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/components/nostr/kinds/ZapReceiptRenderer.tsx b/src/components/nostr/kinds/ZapReceiptRenderer.tsx index 395b655..5e6bbbb 100644 --- a/src/components/nostr/kinds/ZapReceiptRenderer.tsx +++ b/src/components/nostr/kinds/ZapReceiptRenderer.tsx @@ -36,12 +36,6 @@ export function Kind9735Renderer({ event }: BaseEventProps) { const zappedEvent = useNostrEvent(eventPointer || undefined); const zappedAddress = useNostrEvent(addressPointer || undefined); - // Get zap comment from request - const zapComment = useMemo(() => { - if (!zapRequest) return null; - return zapRequest.content || null; - }, [zapRequest]); - // Format amount (convert from msats to sats) const amountInSats = useMemo(() => { if (!zapAmount) return 0; @@ -76,9 +70,9 @@ export function Kind9735Renderer({ event }: BaseEventProps) { {/* Zap comment */} - {zapComment && ( + {zapRequest && zapRequest.content && (
- +
)}