Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-10-29 21:50:09 +0300
committerJoas Schilling <coding@schilljs.com>2020-10-29 21:52:40 +0300
commit926c9c4ea2a0d4bf24c6d31763e3ac22bdb655e2 (patch)
tree41189edbded33a96786d3591c8852f07cefe466e /lib
parent05b3d39308aceb0b2537d886ac1c3ef1af33b767 (diff)
Also delete the room if the last moderator leaves …
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/RoomController.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php
index ab28622d1..37e0f6055 100644
--- a/lib/Controller/RoomController.php
+++ b/lib/Controller/RoomController.php
@@ -1097,7 +1097,9 @@ class RoomController extends AEnvironmentAwareController {
&& $room->getNumberOfModerators() === 1) {
return new DataResponse([], Http::STATUS_BAD_REQUEST);
}
- } elseif ($room->getType() !== Room::CHANGELOG_CONVERSATION &&
+ }
+
+ if ($room->getType() !== Room::CHANGELOG_CONVERSATION &&
$room->getNumberOfParticipants() === 1) {
$room->deleteRoom();
return new DataResponse();