@babblevoice/babble-drachtio-callmanager 1.6.7 → 1.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/call.js +18 -1
- package/package.json +1 -1
package/lib/call.js
CHANGED
|
@@ -314,7 +314,7 @@ class call {
|
|
|
314
314
|
if( !this._entity.realm && this._entity.uri ) {
|
|
315
315
|
let uriparts = this._entity.uri.split( "@" )
|
|
316
316
|
if( uriparts.length > 1 )
|
|
317
|
-
|
|
317
|
+
this._entity.realm = uriparts[ 1 ]
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
if( !this._entity.uri && this._entity.username && this._entity.realm ) {
|
|
@@ -344,6 +344,23 @@ class call {
|
|
|
344
344
|
set entity( e ) {
|
|
345
345
|
if( !e.uri && !( e.username && e.realm ) ) return
|
|
346
346
|
this._entity = e
|
|
347
|
+
|
|
348
|
+
if( !this._entity.username && this._entity.uri ) {
|
|
349
|
+
this._entity.username = this._entity.uri.split( "@" )[ 0 ]
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
if( !this._entity.realm && this._entity.uri ) {
|
|
353
|
+
let uriparts = this._entity.uri.split( "@" )
|
|
354
|
+
if( uriparts.length > 1 )
|
|
355
|
+
this._entity.realm = uriparts[ 1 ]
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
if( !this._entity.uri && this._entity.username && this._entity.realm ) {
|
|
359
|
+
this._entity.uri = this._entity.username + "@" + this._entity.realm
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
if( !this._entity.name ) this._entity.name = ""
|
|
363
|
+
if( !this._entity.display ) this._entity.display = ""
|
|
347
364
|
}
|
|
348
365
|
|
|
349
366
|
/**
|