aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorskjnldsv <skjnldsv@protonmail.com>2024-06-06 19:36:19 +0200
committerskjnldsv <skjnldsv@protonmail.com>2024-06-12 10:27:29 +0200
commit8bed23288b781db22c0825df7fac9f5312fbf6c4 (patch)
treebb4ace2d7cbca2c59402e7d04e30246ec1c9000f /core
parent4a77fe3530d3213a2700b8ecdc1ccf3b4195b41a (diff)
downloadnextcloud-server-8bed23288b781db22c0825df7fac9f5312fbf6c4.tar.gz
nextcloud-server-8bed23288b781db22c0825df7fac9f5312fbf6c4.zip
fix(files_sharing): dark avatar support
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'core')
-rw-r--r--core/Controller/AvatarController.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/Controller/AvatarController.php b/core/Controller/AvatarController.php
index 88a5aa402aa..f65281602bd 100644
--- a/core/Controller/AvatarController.php
+++ b/core/Controller/AvatarController.php
@@ -14,14 +14,13 @@ use OCP\AppFramework\Http\Attribute\FrontpageRoute;
use OCP\AppFramework\Http\DataDisplayResponse;
use OCP\AppFramework\Http\FileDisplayResponse;
use OCP\AppFramework\Http\JSONResponse;
-use OCP\AppFramework\Http\RedirectResponse;
+use OCP\AppFramework\Http\Response;
use OCP\Files\File;
use OCP\Files\IRootFolder;
use OCP\IAvatarManager;
use OCP\ICache;
use OCP\IL10N;
use OCP\IRequest;
-use OCP\IURLGenerator;
use OCP\IUserManager;
use Psr\Log\LoggerInterface;
@@ -42,7 +41,6 @@ class AvatarController extends Controller {
protected LoggerInterface $logger,
protected ?string $userId,
protected TimeFactory $timeFactory,
- protected IURLGenerator $urlGenerator,
protected GuestAvatarController $guestAvatarController,
) {
parent::__construct($appName, $request);
@@ -58,7 +56,8 @@ class AvatarController extends Controller {
*
* @param string $userId ID of the user
* @param int $size Size of the avatar
- * @return FileDisplayResponse<Http::STATUS_OK, array{Content-Type: string, X-NC-IsCustomAvatar: int}>|JSONResponse<Http::STATUS_NOT_FOUND, array<empty>, array{}>
+ * @param bool $guestFallback Fallback to guest avatar if not found
+ * @return FileDisplayResponse<Http::STATUS_OK|Http::STATUS_CREATED, array{Content-Type: string, X-NC-IsCustomAvatar?: int}>|JSONResponse<Http::STATUS_NOT_FOUND, array<empty>, array{}>|Response<Http::STATUS_INTERNAL_SERVER_ERROR, array{}>
*
* 200: Avatar returned
* 404: Avatar not found
@@ -108,7 +107,8 @@ class AvatarController extends Controller {
*
* @param string $userId ID of the user
* @param int $size Size of the avatar
- * @return FileDisplayResponse<Http::STATUS_OK, array{Content-Type: string, X-NC-IsCustomAvatar: int}>|JSONResponse<Http::STATUS_NOT_FOUND, array<empty>, array{}>
+ * @param bool $guestFallback Fallback to guest avatar if not found
+ * @return FileDisplayResponse<Http::STATUS_OK|Http::STATUS_CREATED, array{Content-Type: string, X-NC-IsCustomAvatar?: int}>|JSONResponse<Http::STATUS_NOT_FOUND, array<empty>, array{}>|Response<Http::STATUS_INTERNAL_SERVER_ERROR, array{}>
*
* 200: Avatar returned
* 404: Avatar not found