move blocking non-participating users back to InRoomChannel
as it doesn't need to happen for ToDeviceChannel
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user