Merge pull request #1288 from matrix-org/bwindels/alwayssenddone
Send .done event for to_device verification
This commit is contained in:
@@ -44,11 +44,6 @@ export class InRoomChannel {
|
||||
this._requestEventId = null;
|
||||
}
|
||||
|
||||
/** Whether this channel needs m.key.verification.done messages to be sent after a successful verification */
|
||||
get needsDoneMessage() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get receiveStartFromOtherDevices() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -61,10 +61,6 @@ export class ToDeviceChannel {
|
||||
return this._deviceId;
|
||||
}
|
||||
|
||||
get needsDoneMessage() {
|
||||
return false;
|
||||
}
|
||||
|
||||
static getEventType(event) {
|
||||
return event.getType();
|
||||
}
|
||||
|
||||
@@ -819,11 +819,9 @@ export class VerificationRequest extends EventEmitter {
|
||||
}
|
||||
|
||||
onVerifierFinished() {
|
||||
if (this.channel.needsDoneMessage) {
|
||||
// verification in DM requires a done message
|
||||
this.channel.send("m.key.verification.done", {});
|
||||
}
|
||||
this.channel.send("m.key.verification.done", {});
|
||||
this._verifierHasFinished = true;
|
||||
// move to .done phase
|
||||
const newTransitions = this._applyPhaseTransitions();
|
||||
if (newTransitions.length) {
|
||||
this._setPhase(newTransitions[newTransitions.length - 1].phase);
|
||||
|
||||
Reference in New Issue
Block a user