mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 19:38:09 +00:00
feat(LinphoneUtils): supports addresses like sip:[word]
This commit is contained in:
parent
0c0b8c4f1a
commit
c1e93ffa60
1 changed files with 2 additions and 1 deletions
|
|
@ -16,7 +16,8 @@ function getContactUsername (contact) {
|
|||
contact // String.
|
||||
|
||||
if (Utils.isString(object)) {
|
||||
return object.substring(4, object.indexOf('@')) // 4 = length('sip:')
|
||||
var index = object.indexOf('@')
|
||||
return object.substring(4, index !== -1 ? index : undefined) // 4 = length('sip:')
|
||||
}
|
||||
|
||||
return object.vcard.username
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue