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
Add AsJson forms of the key import/export methods (#4057)
This commit is contained in:
@@ -346,10 +346,18 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, RustCryptoEv
|
||||
return JSON.parse(raw);
|
||||
}
|
||||
|
||||
public async exportRoomKeysAsJson(): Promise<string> {
|
||||
return await this.olmMachine.exportRoomKeys(() => true);
|
||||
}
|
||||
|
||||
public async importRoomKeys(keys: IMegolmSessionData[], opts?: ImportRoomKeysOpts): Promise<void> {
|
||||
return await this.backupManager.importRoomKeys(keys, opts);
|
||||
}
|
||||
|
||||
public async importRoomKeysAsJson(keys: string, opts?: ImportRoomKeysOpts): Promise<void> {
|
||||
return await this.backupManager.importRoomKeysAsJson(keys, opts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of {@link CryptoApi.userHasCrossSigningKeys}.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user