Skip to content

Commit

Permalink
De-stub bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewFerr committed Jul 19, 2023
1 parent 1466120 commit f52ebad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/e2ee/RustEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit f52ebad

Please sign in to comment.