From 5e420187e012d972a6941c4c84cd2faf028d1e13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=E2=80=99Aquino?= Date: Mon, 28 Jul 2025 18:04:38 -0700 Subject: [PATCH] Fix highlight comment rendering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://github.com/damus-io/damus/issues/3129 Signed-off-by: Daniel D’Aquino --- nostrdb/NdbBlock.swift | 3 +++ nostrdb/NdbNote.swift | 3 +++ 2 files changed, 6 insertions(+) diff --git a/nostrdb/NdbBlock.swift b/nostrdb/NdbBlock.swift index b38607a3..08b71bd6 100644 --- a/nostrdb/NdbBlock.swift +++ b/nostrdb/NdbBlock.swift @@ -120,6 +120,9 @@ struct NdbBlockGroup: ~Copyable { if event.is_content_encrypted() { return try parse(event: event, keypair: keypair) } + else if event.known_kind == .highlight { + return try parse(event: event, keypair: keypair) + } else { guard let offsets = event.block_offsets(ndb: ndb) else { return try parse(event: event, keypair: keypair) diff --git a/nostrdb/NdbNote.swift b/nostrdb/NdbNote.swift index 9c36eeb5..4ec2345b 100644 --- a/nostrdb/NdbNote.swift +++ b/nostrdb/NdbNote.swift @@ -489,6 +489,9 @@ extension NdbNote { if is_content_encrypted() { return decrypted(keypair: keypair) } + else if known_kind == .highlight { + return self.referenced_comment_items.first?.content + } return content }