diff options
Diffstat (limited to 'core/Controller')
-rw-r--r-- | core/Controller/AvatarController.php | 2 | ||||
-rw-r--r-- | core/Controller/GuestAvatarController.php | 6 |
2 files changed, 4 insertions, 4 deletions
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, |