From f1e9eb4f4c87e14f840b6bb7d3bece1db9a2b9cf Mon Sep 17 00:00:00 2001 From: Siddharth Singh Date: Tue, 2 Jul 2024 04:58:06 +0530 Subject: [PATCH] fetch each author's notes separately --- scripts/nostr-pull.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/nostr-pull.ts b/scripts/nostr-pull.ts index d215e435..ae5b0183 100644 --- a/scripts/nostr-pull.ts +++ b/scripts/nostr-pull.ts @@ -35,8 +35,11 @@ const importUsers = async ( const matched = [ ...await conn.query([{ kinds: [0, 3], authors, limit: 1000 }]), - ...(!profilesOnly ? [] : await conn.query([{ kinds: [1], authors, limit: 1000 }])), + ...(!profilesOnly ? [] : await conn.query( + authors.map((author) => ({ kinds: [1], authors: [author], limit: 200 })), + )), ]; + await conn.close(); await Promise.all( matched.map(async (event) => {