diff options
author | Vitor Mattos <vitor@php.rio> | 2022-11-21 01:15:40 -0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-12-07 15:01:51 +0100 |
commit | dc10d3b7c3019ef340d34eef35e7705a4a84ba0b (patch) | |
tree | 9e496667f29fd895f0a15583f56ef9fa49a7f0f3 /lib/Controller/AvatarController.php | |
parent | 3a34b14822f87ae6aa8ef9dc15712365d0d8f94d (diff) |
Work with avatar identier stored in room table
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib/Controller/AvatarController.php')
-rw-r--r-- | lib/Controller/AvatarController.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Controller/AvatarController.php b/lib/Controller/AvatarController.php index 1fb8b3cf6..33e889eee 100644 --- a/lib/Controller/AvatarController.php +++ b/lib/Controller/AvatarController.php @@ -66,7 +66,9 @@ class AvatarController extends AEnvironmentAwareController { try { $file = $this->request->getUploadedFile('file'); $this->avatarService->setAvatarFromRequest($this->getRoom(), $file); - return new DataResponse(); + return new DataResponse([ + 'avatar' => $this->avatarService->getAvatarUrl($this->getRoom(), $this->userSession->getUser()->getUID()), + ]); } catch (InvalidArgumentException $e) { return new DataResponse(['message' => $e->getMessage()], Http::STATUS_BAD_REQUEST); } catch (\Exception $e) { |