mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
Remove endpoint to get dark avatar, not necessary
Signed-off-by: Vitor Mattos <vitor@php.rio>
This commit is contained in:
parent
9be3867958
commit
d014b4de14
4 changed files with 3 additions and 22 deletions
|
|
@ -34,8 +34,6 @@ return [
|
|||
['name' => 'Avatar#uploadAvatar', 'url' => '/api/{apiVersion}/room/{token}/avatar', 'verb' => 'POST', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\AvatarController::getAvatar() */
|
||||
['name' => 'Avatar#getAvatar', 'url' => '/api/{apiVersion}/room/{token}/avatar', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\AvatarController::getAvatar() */
|
||||
['name' => 'Avatar#getAvatarDark', 'url' => '/api/{apiVersion}/room/{token}/avatar/dark', 'verb' => 'GET', 'requirements' => $requirements],
|
||||
/** @see \OCA\Talk\Controller\AvatarController::deleteAvatar() */
|
||||
['name' => 'Avatar#deleteAvatar', 'url' => '/api/{apiVersion}/room/{token}/avatar', 'verb' => 'DELETE', 'requirements' => $requirements],
|
||||
],
|
||||
|
|
|
|||
|
|
@ -415,12 +415,3 @@
|
|||
- Status code:
|
||||
+ `200 OK`
|
||||
+ `404 Not Found` When the conversation could not be found for the participant
|
||||
|
||||
* Required capability: `avatar`
|
||||
* Method: `GET`
|
||||
* Endpoint: `/room/{token}/avatar/dark`
|
||||
|
||||
* Response:
|
||||
- Status code:
|
||||
+ `200 OK`
|
||||
+ `404 Not Found` When the conversation could not be found for the participant
|
||||
|
|
|
|||
|
|
@ -98,8 +98,8 @@ class AvatarController extends AEnvironmentAwareController {
|
|||
* @NoCSRFRequired
|
||||
* @RequireParticipant
|
||||
*/
|
||||
public function getAvatar(bool $dark = false): Response {
|
||||
$file = $this->avatarService->getAvatar($this->getRoom(), $this->userSession->getUser(), $dark);
|
||||
public function getAvatar(): Response {
|
||||
$file = $this->avatarService->getAvatar($this->getRoom(), $this->userSession->getUser());
|
||||
|
||||
$response = new FileDisplayResponse($file);
|
||||
$response->addHeader('Content-Type', $file->getMimeType());
|
||||
|
|
@ -108,14 +108,6 @@ class AvatarController extends AEnvironmentAwareController {
|
|||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @PublicPage
|
||||
* @RequireParticipant
|
||||
*/
|
||||
public function getAvatarDark(): Response {
|
||||
return $this->getAvatar(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @PublicPage
|
||||
* @RequireModeratorParticipant
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class AvatarService {
|
|||
$this->cache->set($token . '.avatarVersion', md5($content));
|
||||
}
|
||||
|
||||
public function getAvatar(Room $room, ?IUser $user, bool $dark = false): ISimpleFile {
|
||||
public function getAvatar(Room $room, ?IUser $user): ISimpleFile {
|
||||
$token = $room->getToken();
|
||||
try {
|
||||
$folder = $this->appData->getFolder('room-avatar');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue