summaryrefslogtreecommitdiffstats
path: root/lib/Controller/RoomController.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-02-09 13:41:49 +0100
committerJoas Schilling <coding@schilljs.com>2023-02-10 09:10:13 +0100
commit2c7d60dd92825fcd60d8d2e07f3610749c97fba2 (patch)
tree6203a5913a488742015a011285696c6bcc345694 /lib/Controller/RoomController.php
parente6f6583b3b87e6a5cc4e8a04b2c3692f84b86ed8 (diff)
Don't throw when breakout rooms are not started
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Controller/RoomController.php')
-rw-r--r--lib/Controller/RoomController.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php
index ed6bd6f85..3317f106b 100644
--- a/lib/Controller/RoomController.php
+++ b/lib/Controller/RoomController.php
@@ -717,7 +717,12 @@ class RoomController extends AEnvironmentAwareController {
return new DataResponse([], Http::STATUS_FORBIDDEN);
}
- $breakoutRooms = $this->breakoutRoomService->getBreakoutRooms($this->room, $this->participant);
+ try {
+ $breakoutRooms = $this->breakoutRoomService->getBreakoutRooms($this->room, $this->participant);
+ } catch (InvalidArgumentException $e) {
+ return new DataResponse(['error' => $e->getMessage()], Http::STATUS_BAD_REQUEST);
+ }
+
$breakoutRooms[] = $this->room;
$participants = $this->participantService->getSessionsAndParticipantsForRooms($breakoutRooms);