Merge pull request #1070 from vector-im/fix-more-sas-issues

Fix more SAS issues
This commit is contained in:
Bruno Windels 2023-03-31 12:36:14 +02:00 committed by GitHub
commit 4a0e2c7308
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -19,8 +19,9 @@ import {VerificationEventType} from "../channel/types";
export class SendDoneStage extends BaseSASVerificationStage { export class SendDoneStage extends BaseSASVerificationStage {
async completeStage() { async completeStage() {
await this.log.wrap("SendDoneStage.completeStage", async (log) => { await this.log.wrap("SendDoneStage.completeStage", async (log) => {
this.eventEmitter.emit("VerificationCompleted", this.otherUserDeviceId);
await this.channel.send(VerificationEventType.Done, {}, log); await this.channel.send(VerificationEventType.Done, {}, log);
await this.channel.waitForEvent(VerificationEventType.Done);
this.eventEmitter.emit("VerificationCompleted", this.otherUserDeviceId);
}); });
} }
} }

View File

@ -30,7 +30,6 @@ export class VerifyMacStage extends BaseSASVerificationStage {
const macMethod = acceptMessage.message_authentication_code; const macMethod = acceptMessage.message_authentication_code;
const calculateMAC = createCalculateMAC(this.olmSAS, macMethod); const calculateMAC = createCalculateMAC(this.olmSAS, macMethod);
await this.checkMAC(calculateMAC, log); await this.checkMAC(calculateMAC, log);
await this.channel.waitForEvent(VerificationEventType.Done);
this.setNextStage(new SendDoneStage(this.options)); this.setNextStage(new SendDoneStage(this.options));
}); });
} }