From d05b1798b80266ea9ce7e05899d084d92cb938f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sun, 30 May 2021 19:35:51 +0200 Subject: [PATCH] Add callId MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/structures/CallEventGrouper.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/structures/CallEventGrouper.tsx b/src/components/structures/CallEventGrouper.tsx index 5bc2fb4a03..3b6d18310c 100644 --- a/src/components/structures/CallEventGrouper.tsx +++ b/src/components/structures/CallEventGrouper.tsx @@ -19,12 +19,13 @@ import { EventType } from "matrix-js-sdk/src/@types/event"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; export interface TimelineCallState { - callId?: string; + callId: string; isVoice: boolean; } export default class CallEventGrouper { invite: MatrixEvent; + callId: string; private isVoice(): boolean { const invite = this.invite; @@ -43,11 +44,13 @@ export default class CallEventGrouper { public add(event: MatrixEvent) { if (event.getType() === EventType.CallInvite) this.invite = event; + this.callId = event.getContent().call_id; } public getState(): TimelineCallState { return { isVoice: this.isVoice(), + callId: this.callId, } } }