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>
This commit is contained in:
01zulfi
2026-05-15 11:34:37 +05:00
committed by GitHub
parent 2d97445f26
commit 79ecbf6752

View File

@@ -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) {