You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-23 17:02:25 +03:00
Device Dehydration | js-sdk: store/load dehydration key (#4599)
* feat(dehydrated): Use the dehydrated key cache API * feat(dehydrated): Add signalling to device dehydration manager * feat(dehydrated): fix unneeded call getCachedKey * Upgrade to `matrix-sdk-crypto-wasm` v13.0.0 * review: quick fix and doc * apply changes from review * apply changes from review * fix comment * add some tests and emit an event on rehydration failure * factor out event counter into a test util, since it may be useful elsewhere * adjust test to cover a few more lines * fix documentation * Apply suggestions from code review Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * fix missing bracket * add test for getting the dehydration key from SSSS --------- Co-authored-by: Hubert Chathi <hubertc@matrix.org> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
@@ -183,12 +183,23 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, CryptoEventH
|
||||
);
|
||||
this.eventDecryptor = new EventDecryptor(this.logger, olmMachine, this.perSessionBackupDownloader);
|
||||
|
||||
// re-emit the events emitted by managers
|
||||
this.reemitter.reEmit(this.backupManager, [
|
||||
CryptoEvent.KeyBackupStatus,
|
||||
CryptoEvent.KeyBackupSessionsRemaining,
|
||||
CryptoEvent.KeyBackupFailed,
|
||||
CryptoEvent.KeyBackupDecryptionKeyCached,
|
||||
]);
|
||||
this.reemitter.reEmit(this.dehydratedDeviceManager, [
|
||||
CryptoEvent.DehydratedDeviceCreated,
|
||||
CryptoEvent.DehydratedDeviceUploaded,
|
||||
CryptoEvent.RehydrationStarted,
|
||||
CryptoEvent.RehydrationProgress,
|
||||
CryptoEvent.RehydrationCompleted,
|
||||
CryptoEvent.RehydrationError,
|
||||
CryptoEvent.DehydrationKeyCached,
|
||||
CryptoEvent.DehydratedDeviceRotationError,
|
||||
]);
|
||||
|
||||
this.crossSigningIdentity = new CrossSigningIdentity(olmMachine, this.outgoingRequestProcessor, secretStorage);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user