debug: add logging to eventToHighlight conversion

- Add [EVENT-TO-HIGHLIGHT] logs to see if __highlightProps are being preserved
- Add [HIGHLIGHT-CREATION] logs before calling eventToHighlight
- This will help identify why isLocalOnly and publishedRelays are undefined in final highlight
This commit is contained in:
Gigi
2025-10-30 20:59:43 +01:00
parent 959ccac857
commit 389b4de0eb
2 changed files with 14 additions and 0 deletions

View File

@@ -214,6 +214,12 @@ export async function createHighlight(
}
// Convert to Highlight with relay tracking info and return IMMEDIATELY
console.log('🔄 [HIGHLIGHT-CREATION] About to convert event to highlight:', {
eventId: signedEvent.id,
hasHighlightProps: !!(signedEvent as any).__highlightProps,
highlightProps: (signedEvent as any).__highlightProps
})
const highlight = eventToHighlight(signedEvent)
return highlight

View File

@@ -31,6 +31,14 @@ export function eventToHighlight(event: NostrEvent): Highlight {
// Check if this event has custom properties from our highlight creation process
const customProps = (event as any).__highlightProps || {}
console.log('🔄 [EVENT-TO-HIGHLIGHT] Converting event to highlight:', {
eventId: event.id,
hasCustomProps: !!(event as any).__highlightProps,
customProps: customProps,
publishedRelays: customProps.publishedRelays,
isLocalOnly: customProps.isLocalOnly
})
return {
id: event.id,
pubkey: event.pubkey,