From 65b24f595c238de124d4ed4a25814f38223ef544 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 9 Oct 2020 18:14:00 +0100 Subject: [PATCH] Missed a reference to callList --- src/client.js | 4 ++-- src/webrtc/call.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/client.js b/src/client.js index f67739036..e207da7b4 100644 --- a/src/client.js +++ b/src/client.js @@ -336,6 +336,8 @@ export function MatrixClient(opts) { if (call) { this._callEventHandler = new CallEventHandler(this); this._supportsVoip = true; + } else { + this._callEventHandler = null; } this._syncingRetry = null; this._syncApi = null; @@ -373,8 +375,6 @@ export function MatrixClient(opts) { this._clientWellKnown = undefined; this._clientWellKnownPromise = undefined; - this._callEventHandler = null; - // The SDK doesn't really provide a clean way for events to recalculate the push // actions for themselves, so we have to kinda help them out when they are encrypted. // We do this so that push rules are correctly executed on events in their decrypted diff --git a/src/webrtc/call.ts b/src/webrtc/call.ts index 15b7135fc..25c2b3fb8 100644 --- a/src/webrtc/call.ts +++ b/src/webrtc/call.ts @@ -1154,7 +1154,8 @@ export class MatrixCall extends EventEmitter { private async placeCallWithConstraints(constraints: MediaStreamConstraints) { logger.log("Getting user media with constraints", constraints); - this.client.callList[this.callId] = this; + // XXX Find a better way to do this + this.client._callEventHandler.calls.set(this.callId, this); this.setState(CallState.WaitLocalMedia); this.direction = CallDirection.Outbound; this.config = constraints;