From 31d16d4277d2b8cd7d1821d95db47d81320f4e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sun, 30 May 2021 15:06:54 +0200 Subject: [PATCH] Fix ignoring events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/stores/TimelineCallEventStore.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/stores/TimelineCallEventStore.ts b/src/stores/TimelineCallEventStore.ts index 4c2acbd34c..4689183adf 100644 --- a/src/stores/TimelineCallEventStore.ts +++ b/src/stores/TimelineCallEventStore.ts @@ -18,11 +18,6 @@ import EventEmitter from "events"; import { EventType } from "matrix-js-sdk/src/@types/event"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -const IGNORED_EVENTS = [ - EventType.CallNegotiate, - EventType.CallCandidates, -]; - export enum TimelineCallEventStoreEvent { CallsChanged = "calls_changed" } @@ -75,7 +70,7 @@ export default class TimelineCallEventStore extends EventEmitter { } public addEvent(event: MatrixEvent) { - if (IGNORED_EVENTS.includes(event.getType())) return; + if (!Array.from(EVENT_TYPE_TO_TIMELINE_CALL_STATE.keys()).includes(event.getType())) return; const callId = event.getContent().call_id; const date = event.getDate();