From 79ecbf675275aedb24b0abc1a05af243bcd4ca86 Mon Sep 17 00:00:00 2001 From: 01zulfi <85733202+01zulfi@users.noreply.github.com> Date: Fri, 15 May 2026 11:34:37 +0500 Subject: [PATCH] core: clear key cache & fix private key encoding in saveInboxKeys() (#9851) * after saving new keys, we didn't clear the cache so getInboxKeys() was still returning old keys * remove unnecessary JSON.stringify on private key in saveInboxKeys() Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com> --- packages/core/src/api/user-manager.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/api/user-manager.ts b/packages/core/src/api/user-manager.ts index a884d37c1..411b5fd06 100644 --- a/packages/core/src/api/user-manager.ts +++ b/packages/core/src/api/user-manager.ts @@ -538,10 +538,11 @@ class UserManager { public: keys.publicKey, private: await this.db .storage() - .encrypt(userEncryptionKey, JSON.stringify(keys.privateKey)) + .encrypt(userEncryptionKey, keys.privateKey) } }; await this.updateUser(updatePayload); + this.keyManager.clearCache(); } async sendVerificationEmail(newEmail?: string) {