File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ export enum CallErrorCode {
218218/**
219219 * The version field that we set in m.call.* events
220220 */
221- const VOIP_PROTO_VERSION = 1 ;
221+ const VOIP_PROTO_VERSION = "1" ;
222222
223223/** The fallback ICE server to use for STUN or TURN protocols. */
224224const FALLBACK_ICE_SERVER = 'stun:turn.matrix.org' ;
@@ -909,7 +909,7 @@ export class MatrixCall extends TypedEventEmitter<CallEvent, CallEventHandlerMap
909909 if ( this . state === CallState . WaitLocalMedia ) return ;
910910 const content = { } ;
911911 // Don't send UserHangup reason to older clients
912- if ( ( this . opponentVersion && this . opponentVersion >= 1 ) || reason !== CallErrorCode . UserHangup ) {
912+ if ( ( this . opponentVersion && this . opponentVersion !== 0 ) || reason !== CallErrorCode . UserHangup ) {
913913 content [ "reason" ] = reason ;
914914 }
915915 this . sendVoipEvent ( EventType . CallHangup , content ) ;
@@ -925,7 +925,7 @@ export class MatrixCall extends TypedEventEmitter<CallEvent, CallEventHandlerMap
925925 throw Error ( "Call must be in 'ringing' state to reject!" ) ;
926926 }
927927
928- if ( this . opponentVersion < 1 ) {
928+ if ( this . opponentVersion === 0 ) {
929929 logger . info (
930930 `Opponent version is less than 1 (${ this . opponentVersion } ): sending hangup instead of reject` ,
931931 ) ;
You can’t perform that action at this time.
0 commit comments