From e57a2449e2fbb642dd55794be49df96e2aa9343f Mon Sep 17 00:00:00 2001 From: Kieran Date: Tue, 4 Apr 2023 20:49:49 +0100 Subject: [PATCH] bug: patch profile --- packages/app/src/Cache/UserCache.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/app/src/Cache/UserCache.ts b/packages/app/src/Cache/UserCache.ts index 3df176c..cb14a2c 100644 --- a/packages/app/src/Cache/UserCache.ts +++ b/packages/app/src/Cache/UserCache.ts @@ -77,9 +77,13 @@ class UserProfileCache extends FeedCache { } } - 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]);