Skip to content

Commit

Permalink
Merge pull request #32191 from nextcloud/handle-calendar-reminders-wi…
Browse files Browse the repository at this point in the history
…th-infinite-recurrence

Handle processing reminders for calendar objects with an infinite number of recurrences
  • Loading branch information
blizzz authored Apr 28, 2022
2 parents a50b4ca + 5494dd7 commit 8342964
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/dav/lib/CalDAV/Reminder/ReminderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
use Sabre\VObject\InvalidDataException;
use Sabre\VObject\ParseException;
use Sabre\VObject\Recur\EventIterator;
use Sabre\VObject\Recur\MaxInstancesExceededException;
use Sabre\VObject\Recur\NoInstancesException;
use function strcasecmp;

Expand Down Expand Up @@ -247,6 +248,10 @@ public function onCalendarObjectCreate(array $objectData):void {
// instance. We are skipping this event from the output
// entirely.
return;
} catch (MaxInstancesExceededException $e) {
// The event has more than 3500 recurring-instances
// so we can ignore it
return;
}

while ($iterator->valid() && count($processedAlarms) < count($masterAlarms)) {
Expand Down

0 comments on commit 8342964

Please sign in to comment.