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