mirror of
https://github.com/nextcloud/server.git
synced 2026-03-31 14:47:35 -04:00
Merge pull request #36752 from nextcloud/backport/36735/stable25
[stable25] fix the contacts-menu vcf-contact avatars
This commit is contained in:
commit
e884498869
2 changed files with 8 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ class ContactsStoreTest extends TestCase {
|
|||
$user = $this->createMock(IUser::class);
|
||||
$this->urlGenerator->expects($this->any())
|
||||
->method('linkToRouteAbsolute')
|
||||
->with('core.avatar.getAvatar', $this->anything())
|
||||
->with('core.GuestAvatar.getAvatar', $this->anything())
|
||||
->willReturn('https://urlToNcAvatar.test');
|
||||
$this->contactsManager->expects($this->once())
|
||||
->method('search')
|
||||
|
|
|
|||
Loading…
Reference in a new issue