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
Report backup key import progress on start and improve types (#4711)
* report key import progress on start and improve types * fix lint * add documentation for exported types * link `ImportRoomKeyProgressData` type in `ImportRoomKeyStage` Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * link `ImportRoomKeyFetchProgress` in fetch stage doc Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * link `ImportRoomKeyLoadProgress` in load_keys stage Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * link `ImportRoomKeyProgressData` in `ImportRoomKeyFetchProgress` type doc Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * link `ImportRoomKeyProgressData` in `ImportRoomKeyLoadProgress` type doc Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * link `ImportRoomKeyStage.Fetch` Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * convert `ImportRoomKeyStage.LoadKeys` to link in `ImportRoomKeyLoadProgress` stage doc Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * remove whitespace * improve `ImportRoomKeyStage.Fetch` stage doc Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * improve `ImportRoomKeyStage.LoadKeys ` stage doc Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --------- Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
@@ -67,6 +67,7 @@ import {
|
||||
type KeyBackupRestoreOpts,
|
||||
type KeyBackupRestoreResult,
|
||||
type StartDehydrationOpts,
|
||||
ImportRoomKeyStage,
|
||||
} from "../crypto-api/index.ts";
|
||||
import { deviceKeysToDeviceMap, rustDeviceToJsDevice } from "./device-converter.ts";
|
||||
import { type IDownloadKeyResult, type IQueryKeysRequest } from "../client.ts";
|
||||
@@ -1340,7 +1341,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, CryptoEventH
|
||||
|
||||
try {
|
||||
opts?.progressCallback?.({
|
||||
stage: "fetch",
|
||||
stage: ImportRoomKeyStage.Fetch,
|
||||
});
|
||||
|
||||
return await this.backupManager.restoreKeyBackup(backupVersion, backupDecryptor, opts);
|
||||
|
||||
Reference in New Issue
Block a user