fix: create room/resource calendar synchronously

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
pull/55292/head
Richard Steinmetz 2025-09-24 16:59:32 +07:00 committed by backportbot[bot]
parent 1cf61a59e0
commit 5d15948c3b
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) {