summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-08-17 11:55:10 +0200
committerJoas Schilling <coding@schilljs.com>2023-08-17 11:55:10 +0200
commitf01191f62a49cb577715549c2127431f2267ba25 (patch)
treede786e97f45ecf7b022e3e72afa1e528d33489d7
parent4a0eb07b927562a4c1f09e58339963ee8ac27bc8 (diff)
Use in avatar controllercontroller
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--lib/Controller/AvatarController.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Controller/AvatarController.php b/lib/Controller/AvatarController.php
index 20b5eab51..499d1ef48 100644
--- a/lib/Controller/AvatarController.php
+++ b/lib/Controller/AvatarController.php
@@ -28,7 +28,7 @@ namespace OCA\Talk\Controller;
use InvalidArgumentException;
use OCA\Talk\Middleware\Attribute\RequireModeratorParticipant;
-use OCA\Talk\Middleware\Attribute\RequireParticipant;
+use OCA\Talk\Middleware\Attribute\RequireParticipantOrLoggedInAndListedConversation;
use OCA\Talk\Service\AvatarService;
use OCA\Talk\Service\RoomFormatter;
use OCP\AppFramework\Http;
@@ -102,7 +102,7 @@ class AvatarController extends AEnvironmentAwareController {
#[PublicPage]
#[NoCSRFRequired]
- #[RequireParticipant]
+ #[RequireParticipantOrLoggedInAndListedConversation]
public function getAvatar(bool $darkTheme = false): Response {
$file = $this->avatarService->getAvatar($this->getRoom(), $this->userSession->getUser(), $darkTheme);
@@ -115,7 +115,7 @@ class AvatarController extends AEnvironmentAwareController {
#[PublicPage]
#[NoCSRFRequired]
- #[RequireParticipant]
+ #[RequireParticipantOrLoggedInAndListedConversation]
public function getAvatarDark(): Response {
return $this->getAvatar(true);
}