diff options
author | leith abdulla <online-nextcloud@eleith.com> | 2020-11-07 15:56:32 +0000 |
---|---|---|
committer | leith abdulla <online-nextcloud@eleith.com> | 2020-11-07 08:13:47 -0800 |
commit | 3d6bcd3bf97741c729b23ba79a3e737aec483fa2 (patch) | |
tree | 9e09a62fefc16e058e396928e8989671f918104f /lib | |
parent | e1f1a0e797ef67d16b03aa69cf7b4538b8ec6f6c (diff) |
vcard should only have 1 photo field when adding/removing photos
when adding photo fields through the social api service, an extra photo
field is created for vcard version 3.0 due to setting a field as empty
instead of unsetting it all together
when removing photo fields, this empty photo field is left untouched
thus, syncing photos to address book clients can be buggy as most
address book clients do not properly iterate through all photo fields to
display the contact photo
Signed-off-by: leith abdulla <online-nextcloud@eleith.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Service/SocialApiService.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Service/SocialApiService.php b/lib/Service/SocialApiService.php index 446a9ef6..b1657734 100644 --- a/lib/Service/SocialApiService.php +++ b/lib/Service/SocialApiService.php @@ -118,7 +118,7 @@ class SocialApiService { $contact['PHOTO;ENCODING=b;TYPE=' . $imageType . ';VALUE=BINARY'] = $photo; // remove previous photo (necessary as new attribute is not equal to 'PHOTO') - $contact['PHOTO'] = ''; + unset($contact['PHOTO']); } } |