From c5a32b911d685e0d02541ac344043c3e6f49bf6f Mon Sep 17 00:00:00 2001 From: Gigi Date: Thu, 2 Oct 2025 10:15:34 +0200 Subject: [PATCH] debug: add detailed logging for bookmark content - Check if bookmark list has encrypted content - Log content preview to understand the structure - This will help determine why browser extension isn't triggered --- src/services/bookmarkService.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/services/bookmarkService.ts b/src/services/bookmarkService.ts index 1847d822..3ab78938 100644 --- a/src/services/bookmarkService.ts +++ b/src/services/bookmarkService.ts @@ -114,11 +114,23 @@ export const fetchBookmarks = async ( const bookmarkListEvent = bookmarkListEvents[0] console.log('Found bookmark list event:', bookmarkListEvent.id) + console.log('Bookmark list content:', bookmarkListEvent.content) + console.log('Bookmark list tags:', bookmarkListEvent.tags) // Use applesauce helpers to get public bookmarks const publicBookmarks = Helpers.getPublicBookmarks(bookmarkListEvent) console.log('Public bookmarks:', publicBookmarks) + // Check if there's encrypted content that needs decryption + const hasEncryptedContent = bookmarkListEvent.content && + (bookmarkListEvent.content.includes('?iv=') || + bookmarkListEvent.content.includes('?version=') || + bookmarkListEvent.content.startsWith('nip44:') || + bookmarkListEvent.content.startsWith('nip04:')) + + console.log('Has encrypted content:', hasEncryptedContent) + console.log('Content preview:', bookmarkListEvent.content?.substring(0, 100)) + // Try to get private bookmarks - this should trigger browser extension if needed let privateBookmarks = null try {