Merge pull request #55292 from nextcloud/backport/55282/stable32

[stable32] fix: create room/resource calendar synchronously
pull/55279/head
Andy Scherzinger 2025-10-16 00:47:21 +07:00 committed by GitHub
commit 6bc2b77ec0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 2 deletions

@ -102,8 +102,15 @@ class ResourcesRoomsUpdater {
$id = $this->addToCache($dbTable, $backendId, $resource);
$this->addMetadataToCache($dbTableMetadata, $foreignKey, $id, $metadata);
// we don't create the calendar here, it is created lazily
// when an event is actually scheduled with this resource / room
$principalName = implode('-', [$backendId, $newId]);
$this->calDavBackend->createCalendar(
implode('/', [$principalPrefix, $principalName]),
CalDavBackend::RESOURCE_BOOKING_CALENDAR_URI,
[
'{DAV:}displayname' => CalDavBackend::RESOURCE_BOOKING_CALENDAR_NAME,
],
);
}
foreach ($deletedIds as $deletedId) {