Fix ignoring events

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Š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

View file

@ -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();