From bc9a48804688e06a842169be0ed3efbf2fead559 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Wed, 31 Aug 2022 14:24:25 +0200 Subject: Update avatars on update Signed-off-by: Carl Schwan --- core/Controller/AvatarController.php | 2 +- core/Controller/GuestAvatarController.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'core') diff --git a/core/Controller/AvatarController.php b/core/Controller/AvatarController.php index 804000bf2a7..673ed1be05b 100644 --- a/core/Controller/AvatarController.php +++ b/core/Controller/AvatarController.php @@ -131,7 +131,7 @@ class AvatarController extends Controller { * * @return JSONResponse|FileDisplayResponse */ - public function getAvatar(string $userId, int $size, bool $darkTheme = false) { + public function getAvatar(string $userId, int $size) { if ($size <= 64) { if ($size !== 64) { $this->logger->debug('Avatar requested in deprecated size ' . $size); diff --git a/core/Controller/GuestAvatarController.php b/core/Controller/GuestAvatarController.php index 09146ff3928..dc4f81bd643 100644 --- a/core/Controller/GuestAvatarController.php +++ b/core/Controller/GuestAvatarController.php @@ -60,9 +60,9 @@ class GuestAvatarController extends Controller { * @param string $size The desired avatar size, e.g. 64 for 64x64px * @return FileDisplayResponse|Http\Response */ - public function getAvatar(string $guestName, string $size, ?bool $dark = false) { + public function getAvatar(string $guestName, string $size, ?bool $darkTheme = false) { $size = (int) $size; - $dark = $dark === null ? false : $dark; + $darkTheme = $darkTheme ?? false; if ($size <= 64) { if ($size !== 64) { @@ -78,7 +78,7 @@ class GuestAvatarController extends Controller { try { $avatar = $this->avatarManager->getGuestAvatar($guestName); - $avatarFile = $avatar->getFile($size); + $avatarFile = $avatar->getFile($size, $darkTheme); $resp = new FileDisplayResponse( $avatarFile, -- cgit v1.2.3