From 3f29184848bd7efd92d975f65d2237efe5fa87b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sat, 25 Jun 2022 12:12:17 +0200 Subject: [PATCH] Send call version `1` as a string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/webrtc/call.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/webrtc/call.ts b/src/webrtc/call.ts index 9ae539d6d8b..b2d111f4a13 100644 --- a/src/webrtc/call.ts +++ b/src/webrtc/call.ts @@ -218,7 +218,7 @@ export enum CallErrorCode { /** * The version field that we set in m.call.* events */ -const VOIP_PROTO_VERSION = 1; +const VOIP_PROTO_VERSION = "1"; /** The fallback ICE server to use for STUN or TURN protocols. */ const FALLBACK_ICE_SERVER = 'stun:turn.matrix.org'; @@ -909,7 +909,7 @@ export class MatrixCall extends TypedEventEmitter= 1) || reason !== CallErrorCode.UserHangup) { + if ((this.opponentVersion && this.opponentVersion !== 0) || reason !== CallErrorCode.UserHangup) { content["reason"] = reason; } this.sendVoipEvent(EventType.CallHangup, content); @@ -925,7 +925,7 @@ export class MatrixCall extends TypedEventEmitter