diff options
author | Louis <6653109+artonge@users.noreply.github.com> | 2023-02-16 14:01:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-16 14:01:19 +0100 |
commit | 98b998a2de2a0a013028fadec2e3618852442ce9 (patch) | |
tree | f1a3bb7fc9f9fa2f18bdc448d99e9439516b193f /lib | |
parent | bc91dca7035c06e32131d23565f30535b8850bb0 (diff) | |
parent | b38d2daede9f6079040412d0a0531ac549433582 (diff) | |
download | nextcloud-server-98b998a2de2a0a013028fadec2e3618852442ce9.tar.gz nextcloud-server-98b998a2de2a0a013028fadec2e3618852442ce9.zip |
Merge pull request #36735 from nextcloud/fix/32635/fix-vcf-contacts
fix the contacts-menu vcf-contact avatars
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Contacts/ContactsMenu/ContactsStore.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/Contacts/ContactsMenu/ContactsStore.php b/lib/private/Contacts/ContactsMenu/ContactsStore.php index a0a14cd9cbd..3a75e924d24 100644 --- a/lib/private/Contacts/ContactsMenu/ContactsStore.php +++ b/lib/private/Contacts/ContactsMenu/ContactsStore.php @@ -287,7 +287,13 @@ class ContactsStore implements IContactsStore { if (isset($contact['UID'])) { $uid = $contact['UID']; $entry->setId($uid); - $avatar = $this->urlGenerator->linkToRouteAbsolute('core.avatar.getAvatar', ['userId' => $uid, 'size' => 64]); + if (isset($contact['isLocalSystemBook'])) { + $avatar = $this->urlGenerator->linkToRouteAbsolute('core.avatar.getAvatar', ['userId' => $uid, 'size' => 64]); + } elseif (isset($contact['FN'])) { + $avatar = $this->urlGenerator->linkToRouteAbsolute('core.GuestAvatar.getAvatar', ['guestName' => $contact['FN'], 'size' => 64]); + } else { + $avatar = $this->urlGenerator->linkToRouteAbsolute('core.GuestAvatar.getAvatar', ['guestName' => $uid, 'size' => 64]); + } $entry->setAvatar($avatar); } |