diff options
author | Vitor Mattos <vitor@php.rio> | 2023-01-18 16:55:00 -0300 |
---|---|---|
committer | Vitor Mattos <vitor@php.rio> | 2023-01-18 16:55:00 -0300 |
commit | cb967754abd840dd353127a087d7c85c6dba7c80 (patch) | |
tree | 9d8351ed0e4fc37bae67f20c6b025f5e25a4f756 /lib/Controller/RecordingController.php | |
parent | aed32de2c7423d701dda28e49478483481bd28e9 (diff) |
Fixes to share stored recording
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'lib/Controller/RecordingController.php')
-rw-r--r-- | lib/Controller/RecordingController.php | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/lib/Controller/RecordingController.php b/lib/Controller/RecordingController.php index 73ba4541f..a1670c618 100644 --- a/lib/Controller/RecordingController.php +++ b/lib/Controller/RecordingController.php @@ -105,12 +105,30 @@ class RecordingController extends AEnvironmentAwareController { * @PublicPage * @RequireModeratorParticipant */ - public function notificationDismiss(string $token, string $dateTime): DataResponse { + public function notificationDismiss(int $timestamp): DataResponse { try { $this->recordingService->notificationDismiss( - $token, - $this->participant->getAttendee()->getActorId(), - $dateTime + $this->getRoom(), + $this->participant, + $timestamp + ); + } catch (InvalidArgumentException $e) { + return new DataResponse(['error' => $e->getMessage()], Http::STATUS_BAD_REQUEST); + } + return new DataResponse(); + } + + /** + * @PublicPage + * @RequireModeratorParticipant + */ + public function shareToChat(int $fileId, int $timestamp): DataResponse { + try { + $this->recordingService->shareToChat( + $this->getRoom(), + $this->participant, + $fileId, + $timestamp ); } catch (InvalidArgumentException $e) { return new DataResponse(['error' => $e->getMessage()], Http::STATUS_BAD_REQUEST); |