summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-01-18 15:34:25 +0100
committerJoas Schilling <coding@schilljs.com>2023-01-20 06:53:48 +0100
commitb781a2f737e6f61b5b0d921830e746b39c4897b6 (patch)
treeccefcd4e01a2df73a3ef067bcc7e2cfeb8c63b6e /lib
parentbfd8771ebf24d2502c945824274868c6f5bdad05 (diff)
Don't throw/error when the recording was stopped in parallel
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Service/RecordingService.php2
-rw-r--r--lib/Service/RoomService.php2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/Service/RecordingService.php b/lib/Service/RecordingService.php
index a8d7b666f..408ebf066 100644
--- a/lib/Service/RecordingService.php
+++ b/lib/Service/RecordingService.php
@@ -68,7 +68,7 @@ class RecordingService {
public function stop(Room $room): void {
if ($room->getCallRecording() === Room::RECORDING_NONE) {
- throw new InvalidArgumentException('recording');
+ return;
}
$this->roomService->setCallRecording($room);
}
diff --git a/lib/Service/RoomService.php b/lib/Service/RoomService.php
index bcb36312e..572a12951 100644
--- a/lib/Service/RoomService.php
+++ b/lib/Service/RoomService.php
@@ -369,6 +369,8 @@ class RoomService {
/**
* @param Room $room
* @param integer $status 0 none|1 video|2 audio
+ * @throws \InvalidArgumentException When the status is invalid, not Room::RECORDING_*
+ * @throws \InvalidArgumentException When trying to start
*/
public function setCallRecording(Room $room, int $status = Room::RECORDING_NONE): void {
if (!$this->config->isRecordingEnabled() && $status !== Room::RECORDING_NONE) {