@@ -158,9 +158,9 @@ export default class LegacyCallHandler extends EventEmitter {
158158 private transferees = new Map < string , MatrixCall > ( ) ; // callId (target) -> call (transferee)
159159 private audioPromises = new Map < AudioID , Promise < void > > ( ) ;
160160 private audioElementsWithListeners = new Map < HTMLMediaElement , boolean > ( ) ;
161- private supportsPstnProtocol = null ;
162- private pstnSupportPrefixed = null ; // True if the server only support the prefixed pstn protocol
163- private supportsSipNativeVirtual = null ; // im.vector.protocol.sip_virtual and im.vector.protocol.sip_native
161+ private supportsPstnProtocol : boolean | null = null ;
162+ private pstnSupportPrefixed : boolean | null = null ; // True if the server only support the prefixed pstn protocol
163+ private supportsSipNativeVirtual : boolean | null = null ; // im.vector.protocol.sip_virtual and im.vector.protocol.sip_native
164164
165165 // Map of the asserted identity users after we've looked them up using the API.
166166 // We need to be be able to determine the mapped room synchronously, so we
@@ -187,7 +187,7 @@ export default class LegacyCallHandler extends EventEmitter {
187187 // check asserted identity: if we're not obeying asserted identity,
188188 // this map will never be populated, but we check anyway for sanity
189189 if ( this . shouldObeyAssertedfIdentity ( ) ) {
190- const nativeUser = this . assertedIdentityNativeUsers [ call . callId ] ;
190+ const nativeUser = this . assertedIdentityNativeUsers . get ( call . callId ) ;
191191 if ( nativeUser ) {
192192 const room = findDMForUser ( MatrixClientPeg . get ( ) , nativeUser ) ;
193193 if ( room ) return room . roomId ;
@@ -466,8 +466,8 @@ export default class LegacyCallHandler extends EventEmitter {
466466 return this . getAllActiveCallsNotInRoom ( roomId ) ;
467467 }
468468
469- public getTransfereeForCallId ( callId : string ) : MatrixCall {
470- return this . transferees [ callId ] ;
469+ public getTransfereeForCallId ( callId : string ) : MatrixCall | undefined {
470+ return this . transferees . get ( callId ) ;
471471 }
472472
473473 public play ( audioId : AudioID ) : void {
@@ -621,7 +621,7 @@ export default class LegacyCallHandler extends EventEmitter {
621621 logger . log ( `Asserted identity ${ newAssertedIdentity } mapped to ${ newNativeAssertedIdentity } ` ) ;
622622
623623 if ( newNativeAssertedIdentity ) {
624- this . assertedIdentityNativeUsers [ call . callId ] = newNativeAssertedIdentity ;
624+ this . assertedIdentityNativeUsers . set ( call . callId , newNativeAssertedIdentity ) ;
625625
626626 // If we don't already have a room with this user, make one. This will be slightly odd
627627 // if they called us because we'll be inviting them, but there's not much we can do about
@@ -917,7 +917,7 @@ export default class LegacyCallHandler extends EventEmitter {
917917 return ;
918918 }
919919 if ( transferee ) {
920- this . transferees [ call . callId ] = transferee ;
920+ this . transferees . set ( call . callId , transferee ) ;
921921 }
922922
923923 this . setCallListeners ( call ) ;
0 commit comments