From e6155f9e3734a3042778f07bdf913a21ccb8563c Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 9 Oct 2020 17:20:01 +0100 Subject: [PATCH] Use MatrixClient as type and different array syntax --- src/webrtc/callEventHandler.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/webrtc/callEventHandler.ts b/src/webrtc/callEventHandler.ts index cef75e998..94e9ec6a2 100644 --- a/src/webrtc/callEventHandler.ts +++ b/src/webrtc/callEventHandler.ts @@ -18,18 +18,19 @@ import MatrixEvent from '../models/event'; import {logger} from '../logger'; import { createNewMatrixCall, MatrixCall, CallErrorCode, CallState, CallDirection } from './call'; import { EventType } from '../@types/event'; +import { MatrixClient } from '../client'; // Don't ring unless we'd be ringing for at least 3 seconds: the user needs some // time to press the 'accept' button const RING_GRACE_PERIOD = 3000; export class CallEventHandler { - client: any; + client: MatrixClient; calls: Map; - callEventBuffer: Array; + callEventBuffer: MatrixEvent[]; candidatesByCall: Map>; - constructor(client: any) { + constructor(client: MatrixClient) { this.client = client; this.calls = new Map(); // The sync code always emits one event at a time, so it will patiently