Commit c1e93ffa authored by Wescoeur's avatar Wescoeur

feat(LinphoneUtils): supports addresses like `sip:[word]`

parent 0c0b8c4f
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment