fix: only decrypt events with actual encrypted content

Use applesauce Helpers.hasHiddenContent() instead of checking for
any content. This properly detects encrypted content and avoids
sending unnecessary decrypt requests to Amber for events that just
have plain text content.

Before: (evt.content && evt.content.length > 0)
After: Helpers.hasHiddenContent(evt)

Result:
- Only events with encrypted content sent to Amber
- Reduces unnecessary decrypt requests
- Faster bookmark loading
This commit is contained in:
Gigi
2025-10-17 20:53:25 +02:00
parent 5c4fca9cc9
commit f6cc49c07a

View File

@@ -173,7 +173,7 @@ export async function collectBookmarksFromEvents(
)
// Schedule decrypt if needed
if (signerCandidate && ((Helpers.hasHiddenTags(evt) && !Helpers.isHiddenTagsUnlocked(evt)) || (evt.content && evt.content.length > 0))) {
if (signerCandidate && ((Helpers.hasHiddenTags(evt) && !Helpers.isHiddenTagsUnlocked(evt)) || Helpers.hasHiddenContent(evt))) {
decryptJobs.push({ evt, metadata })
} else {
// Check for already-unlocked hidden bookmarks