move blocking non-participating users back to InRoomChannel

as it doesn't need to happen for ToDeviceChannel
This commit is contained in:
Bruno Windels
2019-12-20 13:47:04 +00:00
parent 48977e6eaa
commit 883b83f1da
2 changed files with 7 additions and 6 deletions
@@ -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();
@@ -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) {