mirror of
https://github.com/dergigi/boris.git
synced 2025-12-18 23:24:22 +01:00
debug: log all fetched events to identify ID mismatch
- Show sample of note IDs being requested - Log every event fetched with kind and content length - Helps diagnose why kind:1 events aren't in the hydration map
This commit is contained in:
@@ -152,6 +152,14 @@ class BookmarkController {
|
|||||||
|
|
||||||
idToEvent.set(event.id, event)
|
idToEvent.set(event.id, event)
|
||||||
|
|
||||||
|
// Log all fetched events to see what we're getting
|
||||||
|
console.log('📥 Fetched event:', {
|
||||||
|
id: event.id.slice(0, 12),
|
||||||
|
kind: event.kind,
|
||||||
|
contentLen: event.content?.length || 0,
|
||||||
|
totalInMap: idToEvent.size
|
||||||
|
})
|
||||||
|
|
||||||
if (event.kind === 1 && event.content) {
|
if (event.kind === 1 && event.content) {
|
||||||
console.log('✅ Fetched kind:1 with content:', {
|
console.log('✅ Fetched kind:1 with content:', {
|
||||||
id: event.id.slice(0, 12),
|
id: event.id.slice(0, 12),
|
||||||
@@ -275,6 +283,10 @@ class BookmarkController {
|
|||||||
|
|
||||||
console.log(`📋 Requesting hydration for: ${noteIds.length} note IDs, ${coordinates.length} coordinates`)
|
console.log(`📋 Requesting hydration for: ${noteIds.length} note IDs, ${coordinates.length} coordinates`)
|
||||||
|
|
||||||
|
// Show sample of what we're requesting
|
||||||
|
const sampleIds = noteIds.slice(0, 3)
|
||||||
|
console.log(`📋 Sample note IDs to request:`, sampleIds)
|
||||||
|
|
||||||
// Helper to build and emit bookmarks
|
// Helper to build and emit bookmarks
|
||||||
const emitBookmarks = (idToEvent: Map<string, NostrEvent>) => {
|
const emitBookmarks = (idToEvent: Map<string, NostrEvent>) => {
|
||||||
const allBookmarks = dedupeBookmarksById([
|
const allBookmarks = dedupeBookmarksById([
|
||||||
|
|||||||
Reference in New Issue
Block a user