diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-10-05 22:58:07 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-11-29 20:35:21 +0300 |
commit | 64aab3d9324ca769ab7f3925cd34d0c7e56c30be (patch) | |
tree | dbf2dfa6ce84b9e2bb6b40c1d0e7ad6f9a832e81 /lib/BackgroundJob | |
parent | 3b103512520b6fae1afa2dfad09cae85776fc37e (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.php | 2 |
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++; } |