Browse Source

Only allow in group and public rooms

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/8340/head
Joas Schilling 3 years ago
committed by Marco
parent
commit
d818c39f36
  1. 6
      lib/Service/BreakoutRoomService.php

6
lib/Service/BreakoutRoomService.php

@ -67,6 +67,12 @@ class BreakoutRoomService {
throw new InvalidArgumentException('room');
}
if ($parent->getType() !== Room::TYPE_GROUP
&& $parent->getType() !== Room::TYPE_PUBLIC) {
// Can only do breakout rooms in group and public rooms
throw new InvalidArgumentException('room');
}
if ($parent->getObjectType() === BreakoutRoom::PARENT_OBJECT_TYPE) {
// Can not nest breakout rooms
throw new InvalidArgumentException('room');

Loading…
Cancel
Save