Fix ignoring events

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-05-30 15:06:54 +02:00
parent 4ae92d8adc
commit 31d16d4277
No known key found for this signature in database
GPG Key ID: 9760693FDD98A790
1 changed files with 1 additions and 6 deletions

View File

@ -18,11 +18,6 @@ import EventEmitter from "events";
import { EventType } from "matrix-js-sdk/src/@types/event"; import { EventType } from "matrix-js-sdk/src/@types/event";
import { MatrixEvent } from "matrix-js-sdk/src/models/event"; import { MatrixEvent } from "matrix-js-sdk/src/models/event";
const IGNORED_EVENTS = [
EventType.CallNegotiate,
EventType.CallCandidates,
];
export enum TimelineCallEventStoreEvent { export enum TimelineCallEventStoreEvent {
CallsChanged = "calls_changed" CallsChanged = "calls_changed"
} }
@ -75,7 +70,7 @@ export default class TimelineCallEventStore extends EventEmitter {
} }
public addEvent(event: MatrixEvent) { 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 callId = event.getContent().call_id;
const date = event.getDate(); const date = event.getDate();