зеркало из https://github.com/nextcloud/spreed.git
Do not cleanup Changelog rooms
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
79246e1d59
Коммит
1b9f739873
|
@ -63,10 +63,11 @@ class RemoveEmptyRooms extends TimedJob {
|
|||
}
|
||||
|
||||
public function callback(Room $room): void {
|
||||
if ($room->getType() === Room::ONE_TO_ONE_CALL && $room->getNumberOfParticipants(false) <= 1) {
|
||||
$room->deleteRoom();
|
||||
$this->numDeletedRooms++;
|
||||
} else if ($room->getNumberOfParticipants(false) === 0 && $room->getObjectType() !== 'file') {
|
||||
if ($room->getType() === Room::CHANGELOG_CONVERSATION) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($room->getNumberOfParticipants(false) === 0 && $room->getObjectType() !== 'file') {
|
||||
$room->deleteRoom();
|
||||
$this->numDeletedRooms++;
|
||||
}
|
||||
|
|
|
@ -750,7 +750,8 @@ class RoomController extends AEnvironmentAwareController {
|
|||
&& $room->getNumberOfModerators() === 1) {
|
||||
return new DataResponse([], Http::STATUS_BAD_REQUEST);
|
||||
}
|
||||
} else if ($room->getNumberOfParticipants() === 1) {
|
||||
} else if ($room->getType() !== Room::CHANGELOG_CONVERSATION &&
|
||||
$room->getNumberOfParticipants() === 1) {
|
||||
$room->deleteRoom();
|
||||
return new DataResponse();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче