Fix #48 FN in VCARD serialization

Add test
This commit is contained in:
Timothée Jaussoin 2022-10-19 15:35:28 +02:00
parent 626d13bae2
commit 46c2326e6b
3 changed files with 4 additions and 2 deletions

View file

@ -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();

View file

@ -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);

View file

@ -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