From 23a366081fa19e4e75d411641b34ec4ff97e2fb4 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 17 May 2024 18:42:45 -0500 Subject: [PATCH] stats: maybe refresh stats when updating --- src/stats.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/stats.ts b/src/stats.ts index 4364781..9f0d257 100644 --- a/src/stats.ts +++ b/src/stats.ts @@ -39,6 +39,8 @@ async function updateStats(event: NostrEvent) { debug(JSON.stringify({ id: event.id, pubkey: event.pubkey, kind: event.kind, tags: event.tags, statDiffs })); } + pubkeyDiffs.forEach(([_, pubkey]) => refreshAuthorStatsDebounced(pubkey)); + const kysely = await DittoDB.getInstance(); if (pubkeyDiffs.length) queries.push(authorStatsQuery(kysely, pubkeyDiffs));