From 1804432e7d5f1da2f3de6157183767560d6df774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Jaussoin?= Date: Wed, 10 Nov 2021 16:24:08 +0100 Subject: [PATCH] Fix returned vcard4.0 format to allow them to be parsed properly in liblinphone --- flexiapi/app/Account.php | 7 +++++-- flexisip-account-manager.spec | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/flexiapi/app/Account.php b/flexiapi/app/Account.php index d0a6c5e..dc2b849 100644 --- a/flexiapi/app/Account.php +++ b/flexiapi/app/Account.php @@ -234,11 +234,14 @@ KIND:individual IMPP:sip:'.$this->getIdentifierAttribute(); if (!empty($this->attributes['display_name'])) { - $vcard . ' + $vcard .= ' FN:'.$this->attributes['display_name']; + } else { + $vcard .= ' +FN:'.$this->getIdentifierAttribute(); } - if ($this->types) { + if ($this->types->count() > 0) { $vcard .= ' X-LINPHONE-ACCOUNT-TYPE:'.$this->types->implode('key', ','); } diff --git a/flexisip-account-manager.spec b/flexisip-account-manager.spec index 5399890..8395644 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 113 +%define build_number 114 %define var_dir /var/opt/belledonne-communications %define opt_dir /opt/belledonne-communications/share/flexisip-account-manager