From f52ebad90c413637dd4b9ab1bf9af3a47a409ae7 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Thu, 13 Jul 2023 00:59:43 -0400 Subject: [PATCH] De-stub bindings --- src/e2ee/RustEngine.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/e2ee/RustEngine.ts b/src/e2ee/RustEngine.ts index f8ba1aca..d1b3bd83 100644 --- a/src/e2ee/RustEngine.ts +++ b/src/e2ee/RustEngine.ts @@ -18,7 +18,7 @@ import { MatrixClient } from "../MatrixClient"; import { ICryptoRoomInformation } from "./ICryptoRoomInformation"; import { EncryptionAlgorithm } from "../models/Crypto"; import { EncryptionEvent } from "../models/events/EncryptionEvent"; -import { IKeyBackupInfoRetrieved, KeyBackupVersion } from "../models/KeyBackup"; +import { ICurve25519AuthData, IKeyBackupInfoRetrieved, KeyBackupVersion } from "../models/KeyBackup"; /** * @internal @@ -135,14 +135,14 @@ export class RustEngine { } public async enableKeyBackup(info: IKeyBackupInfoRetrieved) { - LogService.warn("RustEngine", "**STUB** Server-side key backups not yet implemented!"); this.keyBackupVersion = info.version; - // await this.machine.enableBackupV1(info); + // TODO Error with message if the key backup uses an unsupported auth_data type + await this.machine.enableBackupV1((info.auth_data as ICurve25519AuthData).public_key, info.version); } public async disableKeyBackup() { this.keyBackupVersion = undefined; - // await this.machine.disableBackup(); + await this.machine.disableBackup(); } private async processKeysClaimRequest(request: KeysClaimRequest) {