fix: hydrate events stats and author stats with filter by kind

This commit is contained in:
P. Reis 2024-04-23 17:16:15 -03:00
parent 5fca482e5c
commit 58d75d1939
1 changed files with 2 additions and 2 deletions

View File

@ -46,8 +46,8 @@ async function hydrateEvents(opts: HydrateEventOpts): Promise<DittoEvent[]> {
} }
} }
await hydrateAuthors({ events: [...allEventsMap.values()], storage, signal }); await hydrateAuthors({ events: [...allEventsMap.values()], storage, signal });
await hydrateAuthorStats([...allEventsMap.values()]); await hydrateAuthorStats([...allEventsMap.values()].filter((e) => e.kind === 0));
await hydrateEventStats([...allEventsMap.values()]); await hydrateEventStats([...allEventsMap.values()].filter((e) => e.kind === 1));
events.forEach((event) => { events.forEach((event) => {
const correspondingEvent = allEventsMap.get(event.id); const correspondingEvent = allEventsMap.get(event.id);