diff --git a/src/crypto/verification/request/InRoomChannel.js b/src/crypto/verification/request/InRoomChannel.js index ca6e66606..12aaeb843 100644 --- a/src/crypto/verification/request/InRoomChannel.js +++ b/src/crypto/verification/request/InRoomChannel.js @@ -178,6 +178,13 @@ export class InRoomChannel { if (event.getRoomId() !== this._roomId) { return; } + // ignore events not sent by us or the other party + const ownUserId = this._client.getUserId(); + const sender = event.getSender(); + if (sender !== ownUserId && sender !== this.userId) { + console.log(`InRoomChannel: ignoring verification event from non-participating sender ${sender}`); + return; + } // set transactionId when receiving a .request if (!this._requestEventId && type === REQUEST_TYPE) { this._requestEventId = event.getId(); diff --git a/src/crypto/verification/request/VerificationRequest.js b/src/crypto/verification/request/VerificationRequest.js index 261751877..b8db96d4f 100644 --- a/src/crypto/verification/request/VerificationRequest.js +++ b/src/crypto/verification/request/VerificationRequest.js @@ -340,12 +340,6 @@ export default class VerificationRequest extends EventEmitter { */ async handleEvent(type, event, timestamp) { const sender = event.getSender(); - - if (sender !== this._client.getUserId() && sender !== this._otherUserId) { - console.log(`VerificationRequest: ignoring verification event from non-participating sender ${sender}`); - return; - } - const content = event.getContent(); if (type === REQUEST_TYPE || type === START_TYPE) { if (this._startTimestamp === null) {