diff --git a/apps/dav/lib/CalDAV/CalendarImpl.php b/apps/dav/lib/CalDAV/CalendarImpl.php index d45e12234d1db..1c36db68cca85 100644 --- a/apps/dav/lib/CalDAV/CalendarImpl.php +++ b/apps/dav/lib/CalDAV/CalendarImpl.php @@ -154,6 +154,11 @@ public function createFromString(string $name, string $calendarData): void { [, $user] = uriSplit($this->calendar->getPrincipalURI()); $fullCalendarFilename = sprintf('calendars/%s/%s/%s', $user, $this->calendarInfo['uri'], $name); + // Force calendar change URI + /** @var Schedule\Plugin $schedulingPlugin */ + $schedulingPlugin = $server->server->getPlugin('caldav-schedule'); + $schedulingPlugin->setPathOfCalendarObjectChange($fullCalendarFilename); + $stream = fopen('php://memory', 'rb+'); fwrite($stream, $calendarData); rewind($stream); diff --git a/apps/dav/lib/CalDAV/Schedule/Plugin.php b/apps/dav/lib/CalDAV/Schedule/Plugin.php index 7ea75dcca2a8a..96bacce4454b6 100644 --- a/apps/dav/lib/CalDAV/Schedule/Plugin.php +++ b/apps/dav/lib/CalDAV/Schedule/Plugin.php @@ -88,6 +88,16 @@ public function initialize(Server $server) { $server->on('afterCreateFile', [$this, 'dispatchSchedulingResponses']); } + /** + * Allow manual setting of the object change URL + * to support public write + * + * @param string $path + */ + public function setPathOfCalendarObjectChange(string $path): void { + $this->pathOfCalendarObjectChange = $path; + } + /** * This method handler is invoked during fetching of properties. *