From b30f278e03543f5988c68480d588267229d25f00 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 31 Mar 2020 15:08:43 +0200 Subject: [PATCH] checking the userid isn't a thing anymore AFAIK --- src/crypto/verification/QRCode.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/crypto/verification/QRCode.js b/src/crypto/verification/QRCode.js index 24d7c43df..1915f9d1c 100644 --- a/src/crypto/verification/QRCode.js +++ b/src/crypto/verification/QRCode.js @@ -23,7 +23,6 @@ limitations under the License. import {VerificationBase as Base} from "./Base"; import { newKeyMismatchError, - newUserMismatchError, } from './Error'; import {decodeBase64} from "../olmlib"; @@ -50,23 +49,6 @@ export class ReciprocateQRCode extends Base { "with this method yet."); } - const targetUserId = this.startEvent.getSender(); - if (!this.userId) { - console.log("Asking to confirm user ID"); - this.userId = await new Promise((resolve, reject) => { - this.emit("confirm_user_id", { - userId: targetUserId, - confirm: resolve, // takes a userId - cancel: () => reject(newUserMismatchError()), - }); - }); - } else if (targetUserId !== this.userId) { - throw newUserMismatchError({ - expected: this.userId, - actual: targetUserId, - }); - } - if (this.startEvent.getContent()['secret'] !== this.request.encodedSharedSecret) { throw newKeyMismatchError(); }