diff --git a/src/Nostr/System.ts b/src/Nostr/System.ts index 470eba99..3b01275f 100644 --- a/src/Nostr/System.ts +++ b/src/Nostr/System.ts @@ -211,14 +211,13 @@ export class NostrSystem { ); console.debug("No profiles: ", couldNotFetch); if (couldNotFetch.length > 0) { - await this.UserDb!.bulkPut( - couldNotFetch.map((a) => { - return { - pubkey: a, - loaded: new Date().getTime(), - } as MetadataCache; - }) - ); + let updates = couldNotFetch.map((a) => { + return { + pubkey: a, + loaded: new Date().getTime(), + }; + }).map(a => this.UserDb!.update(a.pubkey, a)); + await Promise.all(updates); } } }