@@ -158,9 +158,9 @@ export default class LegacyCallHandler extends EventEmitter {
158
158
private transferees = new Map < string , MatrixCall > ( ) ; // callId (target) -> call (transferee)
159
159
private audioPromises = new Map < AudioID , Promise < void > > ( ) ;
160
160
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
164
164
165
165
// Map of the asserted identity users after we've looked them up using the API.
166
166
// We need to be be able to determine the mapped room synchronously, so we
@@ -187,7 +187,7 @@ export default class LegacyCallHandler extends EventEmitter {
187
187
// check asserted identity: if we're not obeying asserted identity,
188
188
// this map will never be populated, but we check anyway for sanity
189
189
if ( this . shouldObeyAssertedfIdentity ( ) ) {
190
- const nativeUser = this . assertedIdentityNativeUsers [ call . callId ] ;
190
+ const nativeUser = this . assertedIdentityNativeUsers . get ( call . callId ) ;
191
191
if ( nativeUser ) {
192
192
const room = findDMForUser ( MatrixClientPeg . get ( ) , nativeUser ) ;
193
193
if ( room ) return room . roomId ;
@@ -466,8 +466,8 @@ export default class LegacyCallHandler extends EventEmitter {
466
466
return this . getAllActiveCallsNotInRoom ( roomId ) ;
467
467
}
468
468
469
- public getTransfereeForCallId ( callId : string ) : MatrixCall {
470
- return this . transferees [ callId ] ;
469
+ public getTransfereeForCallId ( callId : string ) : MatrixCall | undefined {
470
+ return this . transferees . get ( callId ) ;
471
471
}
472
472
473
473
public play ( audioId : AudioID ) : void {
@@ -621,7 +621,7 @@ export default class LegacyCallHandler extends EventEmitter {
621
621
logger . log ( `Asserted identity ${ newAssertedIdentity } mapped to ${ newNativeAssertedIdentity } ` ) ;
622
622
623
623
if ( newNativeAssertedIdentity ) {
624
- this . assertedIdentityNativeUsers [ call . callId ] = newNativeAssertedIdentity ;
624
+ this . assertedIdentityNativeUsers . set ( call . callId , newNativeAssertedIdentity ) ;
625
625
626
626
// If we don't already have a room with this user, make one. This will be slightly odd
627
627
// 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 {
917
917
return ;
918
918
}
919
919
if ( transferee ) {
920
- this . transferees [ call . callId ] = transferee ;
920
+ this . transferees . set ( call . callId , transferee ) ;
921
921
}
922
922
923
923
this . setCallListeners ( call ) ;
0 commit comments