bug: never put empty profile

This commit is contained in:
Kieran 2023-02-08 11:36:06 +00:00
parent 422d7f91ba
commit 9b88fed15c
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
1 changed files with 7 additions and 8 deletions

View File

@ -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);
}
}
}