bug: never put empty profile
This commit is contained in:
parent
422d7f91ba
commit
9b88fed15c
@ -211,14 +211,13 @@ export class NostrSystem {
|
|||||||
);
|
);
|
||||||
console.debug("No profiles: ", couldNotFetch);
|
console.debug("No profiles: ", couldNotFetch);
|
||||||
if (couldNotFetch.length > 0) {
|
if (couldNotFetch.length > 0) {
|
||||||
await this.UserDb!.bulkPut(
|
let updates = couldNotFetch.map((a) => {
|
||||||
couldNotFetch.map((a) => {
|
return {
|
||||||
return {
|
pubkey: a,
|
||||||
pubkey: a,
|
loaded: new Date().getTime(),
|
||||||
loaded: new Date().getTime(),
|
};
|
||||||
} as MetadataCache;
|
}).map(a => this.UserDb!.update(a.pubkey, a));
|
||||||
})
|
await Promise.all(updates);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user