]> source.dussan.org Git - nextcloud-server.git/commit
Added PlaceholderAvatar with own cached images
authorVincent Petry <vincent@nextcloud.com>
Thu, 25 Mar 2021 11:21:03 +0000 (12:21 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Mon, 29 Mar 2021 07:03:36 +0000 (07:03 +0000)
commitab22999eb9d7eb684e31d6e5618241eadfd7e370
tree3f8f20371ddbec8e3dc6c4830604ee9a0f020051
parent2613826fccb9ad9e6571a07141391601b28d513f
Added PlaceholderAvatar with own cached images

When avatar scope is private, the PlaceholderAvatar is used to deliver a
placeholder avatar based on the user's initials.

This was implemented as a separate class for now to avoid messing with
the existing UserAvatar implementation and its generated vs
non-generated logic.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
lib/private/Avatar/AvatarManager.php
lib/private/Avatar/PlaceholderAvatar.php [new file with mode: 0644]
lib/private/Avatar/UserAvatar.php
tests/lib/Avatar/AvatarManagerTest.php