From 58d75d19397a7fe833ae9437e0f62e5e0781a816 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Tue, 23 Apr 2024 17:16:15 -0300 Subject: [PATCH] fix: hydrate events stats and author stats with filter by kind --- src/storages/hydrate.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storages/hydrate.ts b/src/storages/hydrate.ts index 63d7a11..f65641f 100644 --- a/src/storages/hydrate.ts +++ b/src/storages/hydrate.ts @@ -46,8 +46,8 @@ async function hydrateEvents(opts: HydrateEventOpts): Promise { } } await hydrateAuthors({ events: [...allEventsMap.values()], storage, signal }); - await hydrateAuthorStats([...allEventsMap.values()]); - await hydrateEventStats([...allEventsMap.values()]); + await hydrateAuthorStats([...allEventsMap.values()].filter((e) => e.kind === 0)); + await hydrateEventStats([...allEventsMap.values()].filter((e) => e.kind === 1)); events.forEach((event) => { const correspondingEvent = allEventsMap.get(event.id);