diff --git a/flexiapi/app/Account.php b/flexiapi/app/Account.php index 64f5602..ff77ec7 100644 --- a/flexiapi/app/Account.php +++ b/flexiapi/app/Account.php @@ -326,7 +326,8 @@ KIND:individual IMPP:sip:' . $this->getIdentifierAttribute(); $vcard .= ' -FN:' . !empty($this->attributes['display_name']) +FN:'; + $vcard .= !empty($this->attributes['display_name']) ? $this->attributes['display_name'] : $this->getIdentifierAttribute(); diff --git a/flexiapi/tests/Feature/AccountContactsTest.php b/flexiapi/tests/Feature/AccountContactsTest.php index 72eb1c7..d642fdb 100644 --- a/flexiapi/tests/Feature/AccountContactsTest.php +++ b/flexiapi/tests/Feature/AccountContactsTest.php @@ -117,6 +117,7 @@ class AccountContactTest extends TestCase $this->keyAuthenticated($password1->account) ->get('/contacts/vcard') ->assertStatus(200) + ->assertSeeText("FN:".$password2->display_name) ->assertSeeText("X-LINPHONE-ACCOUNT-TYPE:".$typeKey) ->assertSeeText("X-LINPHONE-ACCOUNT-DTMF-PROTOCOL:".$password2->dtmf_protocol) ->assertSeeText("X-LINPHONE-ACCOUNT-ACTION:".$actionKey.';'.$actionCode); diff --git a/flexisip-account-manager.spec b/flexisip-account-manager.spec index cc7e530..4c4f130 100644 --- a/flexisip-account-manager.spec +++ b/flexisip-account-manager.spec @@ -8,7 +8,7 @@ #%define _datadir %{_datarootdir} #%define _docdir %{_datadir}/doc -%define build_number 157 +%define build_number 158 %define var_dir /var/opt/belledonne-communications %define opt_dir /opt/belledonne-communications/share/flexisip-account-manager