Browse Source

fix(events): Don't apply retention before the event happened

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/15027/head
Joas Schilling 7 months ago
parent
commit
820426fd49
No known key found for this signature in database GPG Key ID: F72FA5B49FFA96B0
  1. 7
      lib/BackgroundJob/ExpireObjectRooms.php

7
lib/BackgroundJob/ExpireObjectRooms.php

@ -52,6 +52,13 @@ class ExpireObjectRooms extends TimedJob {
$numDeletedRooms = 0;
foreach ($rooms as $room) {
if ($objectType === Room::OBJECT_TYPE_EVENT) {
[, $endTime] = explode('#', $room->getObjectId());
if ($endTime < $now) {
continue;
}
}
$this->roomService->deleteRoom($room);
$numDeletedRooms++;
}

Loading…
Cancel
Save