mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Send done before waiting for message
This commit is contained in:
parent
515bd24cfb
commit
016f9ff300
@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user