bug: patch profile

This commit is contained in:
Kieran 2023-04-04 20:49:49 +01:00
parent 1a444a8418
commit e57a2449e2
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -77,9 +77,13 @@ class UserProfileCache extends FeedCache<MetadataCache> {
}
}
this.cache.set(m.pubkey, m);
const writeProfile = {
...existing,
...m,
};
this.cache.set(m.pubkey, writeProfile);
if (db.ready) {
await db.users.put(m);
await db.users.put(writeProfile);
this.onTable.add(m.pubkey);
}
this.notifyChange([m.pubkey]);