commit 5e420187e012d972a6941c4c84cd2faf028d1e13
parent 4815c8a6f7ac3cc1a8c882dec220680bd3381a60
Author: Daniel D’Aquino <daniel@daquino.me>
Date: Mon, 28 Jul 2025 18:04:38 -0700
Fix highlight comment rendering
Closes: https://github.com/damus-io/damus/issues/3129
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
Diffstat:
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git 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
@@ -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
}