diff options
author | Simon L <szaimen@e.mail.de> | 2023-02-15 21:43:33 +0100 |
---|---|---|
committer | Simon L <szaimen@e.mail.de> | 2023-02-15 23:16:43 +0100 |
commit | b38d2daede9f6079040412d0a0531ac549433582 (patch) | |
tree | 490ad78aa1e822f7f94bbd062fd8fd6fd2a56217 /lib/private/Contacts | |
parent | b36a31c918ad997e6d227dc7923791c487e18e51 (diff) | |
download | nextcloud-server-b38d2daede9f6079040412d0a0531ac549433582.tar.gz nextcloud-server-b38d2daede9f6079040412d0a0531ac549433582.zip |
fix the contacts-menu vcf-contact avatars
Signed-off-by: Simon L <szaimen@e.mail.de>
Diffstat (limited to 'lib/private/Contacts')
-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); } |