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
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-10-05 22:58:07 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-11-29 20:35:21 +0300
commit64aab3d9324ca769ab7f3925cd34d0c7e56c30be (patch)
treedbf2dfa6ce84b9e2bb6b40c1d0e7ad6f9a832e81 /lib/BackgroundJob
parent3b103512520b6fae1afa2dfad09cae85776fc37e (diff)
Prevent empty "files" room from being removed
Rooms associated to a file are persistent rooms, but they do not have any persistent participants, not even an owner (participants join and leave in each session). Thus these rooms should not be removed even if they are empty. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'lib/BackgroundJob')
-rw-r--r--lib/BackgroundJob/RemoveEmptyRooms.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/BackgroundJob/RemoveEmptyRooms.php b/lib/BackgroundJob/RemoveEmptyRooms.php
index 203697488..35df6200b 100644
--- a/lib/BackgroundJob/RemoveEmptyRooms.php
+++ b/lib/BackgroundJob/RemoveEmptyRooms.php
@@ -64,7 +64,7 @@ class RemoveEmptyRooms extends TimedJob {
if ($room->getType() === Room::ONE_TO_ONE_CALL && $room->getNumberOfParticipants(false) <= 1) {
$room->deleteRoom();
$this->numDeletedRooms++;
- } else if ($room->getNumberOfParticipants(false) === 0) {
+ } else if ($room->getNumberOfParticipants(false) === 0 && $room->getObjectType() !== 'file') {
$room->deleteRoom();
$this->numDeletedRooms++;
}