bug: use latest profile
This commit is contained in:
@ -178,7 +178,10 @@ export class NostrSystem {
|
|||||||
sub.OnEvent = async (e) => {
|
sub.OnEvent = async (e) => {
|
||||||
let profile = mapEventToProfile(e);
|
let profile = mapEventToProfile(e);
|
||||||
if (profile) {
|
if (profile) {
|
||||||
await db.users.put(profile);
|
let existing = await db.users.get(profile.pubkey);
|
||||||
|
if((existing?.created ?? 0) < profile.created) {
|
||||||
|
await db.users.put(profile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let results = await this.RequestSubscription(sub);
|
let results = await this.RequestSubscription(sub);
|
||||||
|
Reference in New Issue
Block a user