mirror of
https://github.com/dergigi/boris.git
synced 2025-12-24 10:04:19 +01:00
fix: detect and decrypt NIP-04 encrypted bookmark content
Added explicit NIP-04 detection in bookmarkProcessing.ts: - Check for ?iv= in content (NIP-04 format) - Previously only checked Helpers.hasHiddenContent() (NIP-44 only) - Now decrypts both NIP-04 and NIP-44 encrypted bookmarks This fixes individual bookmark decryption returning 0 private items despite having encrypted content.
This commit is contained in:
@@ -166,7 +166,15 @@ export async function collectBookmarksFromEvents(
|
||||
)
|
||||
|
||||
// Schedule decrypt if needed
|
||||
if (signerCandidate && ((Helpers.hasHiddenTags(evt) && !Helpers.isHiddenTagsUnlocked(evt)) || Helpers.hasHiddenContent(evt))) {
|
||||
// Check for NIP-44 (Helpers.hasHiddenContent), NIP-04 (?iv= in content), or encrypted tags
|
||||
const hasNip04Content = evt.content && evt.content.includes('?iv=')
|
||||
const needsDecrypt = signerCandidate && (
|
||||
(Helpers.hasHiddenTags(evt) && !Helpers.isHiddenTagsUnlocked(evt)) ||
|
||||
Helpers.hasHiddenContent(evt) ||
|
||||
hasNip04Content
|
||||
)
|
||||
|
||||
if (needsDecrypt) {
|
||||
decryptJobs.push({ evt, metadata })
|
||||
} else {
|
||||
// Check for already-unlocked hidden bookmarks
|
||||
|
||||
Reference in New Issue
Block a user