diff --git a/src/storages/hydrate.ts b/src/storages/hydrate.ts index 8d2d3027..9b958416 100644 --- a/src/storages/hydrate.ts +++ b/src/storages/hydrate.ts @@ -251,11 +251,19 @@ async function gatherAuthorStats(events: DittoEvent[]): Promise ({ + pubkey: row.pubkey, + followers_count: Math.max(0, row.followers_count), + following_count: Math.max(0, row.following_count), + notes_count: Math.max(0, row.notes_count), + })); } /** Collect event stats from the events. */ @@ -271,11 +279,19 @@ async function gatherEventStats(events: DittoEvent[]): Promise ({ + event_id: row.event_id, + reposts_count: Math.max(0, row.reposts_count), + reactions_count: Math.max(0, row.reactions_count), + replies_count: Math.max(0, row.replies_count), + })); } /** Return a normalized event without any non-standard keys. */