@@ -63,13 +63,15 @@ export default class ConnectionManager {
6363 // Set the minimum version to match the SDK
6464 self . _minServerVersion = MINIMUM_VERSION ;
6565
66- self . appVersion = ( ) => appVersion ;
66+ self . appVersion = ( ) => typeof appVersion === 'function' ? appVersion ( ) : appVersion ;
6767
68- self . appName = ( ) => appName ;
68+ self . appName = ( ) => typeof appName === 'function' ? appName ( ) : appName ;
6969
7070 self . capabilities = ( ) => capabilities ;
7171
72- self . deviceId = ( ) => deviceId ;
72+ self . deviceName = ( ) => typeof deviceName === 'function' ? deviceName ( ) : deviceName ;
73+
74+ self . deviceId = ( ) => typeof deviceId === 'function' ? deviceId ( ) : deviceId ;
7375
7476 self . credentialProvider = ( ) => credentialProvider ;
7577
@@ -137,7 +139,7 @@ export default class ConnectionManager {
137139 let apiClient = self . getApiClient ( server . Id ) ;
138140
139141 if ( ! apiClient ) {
140- apiClient = new ApiClient ( serverUrl , appName , appVersion , deviceName , deviceId ) ;
142+ apiClient = new ApiClient ( serverUrl , self . appName ( ) , self . appVersion ( ) , self . deviceName ( ) , self . deviceId ( ) ) ;
141143
142144 self . _apiClients . push ( apiClient ) ;
143145
@@ -232,12 +234,12 @@ export default class ConnectionManager {
232234 headers : {
233235 [ AUTHORIZATION_HEADER ] : getAuthorizationHeader (
234236 {
235- name : appName ,
236- version : appVersion
237+ name : self . appName ( ) ,
238+ version : self . appVersion ( )
237239 } ,
238240 {
239- id : deviceId ,
240- name : deviceName
241+ id : self . deviceId ( ) ,
242+ name : self . deviceName ( )
241243 } ,
242244 server . AccessToken
243245 )
0 commit comments