mirror of
https://github.com/dergigi/boris.git
synced 2026-01-03 23:14:36 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user