fix: don't re-encode public key when changing e2e password
This commit is contained in:
parent
1de24befe5
commit
d43dc2f9ee
|
@ -199,10 +199,12 @@ class Encryption {
|
|||
|
||||
// Encode the private key
|
||||
const encodedPrivateKey = await this.encodePrivateKey(EJSON.stringify(privateKey), password, this.userId as string);
|
||||
|
||||
// This public key is already encoded using EJSON.stringify in the `persistKeys` method
|
||||
const publicKey = UserPreferences.getString(`${server}-${E2E_PUBLIC_KEY}`);
|
||||
|
||||
// Send the new keys to the server
|
||||
await Services.e2eSetUserPublicAndPrivateKeys(EJSON.stringify(publicKey), encodedPrivateKey);
|
||||
await Services.e2eSetUserPublicAndPrivateKeys(publicKey, encodedPrivateKey);
|
||||
};
|
||||
|
||||
// get a encryption room instance
|
||||
|
|
Loading…
Reference in New Issue