From 82615ce8688da9ecc2c0e4e9353c463e2f4c3fee Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Tue, 11 Jun 2024 14:00:14 +0200 Subject: [PATCH] fix(caldav): allow VJOURNAL if no supported component set is specified This is mandated by the RFCs. Signed-off-by: Richard Steinmetz --- apps/dav/lib/CalDAV/CalDavBackend.php | 2 +- apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index 8fff6902f9a54..5196a971e748f 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -755,7 +755,7 @@ public function createCalendar($principalUri, $calendarUri, array $properties) { 'uri' => $calendarUri, 'synctoken' => 1, 'transparent' => 0, - 'components' => 'VEVENT,VTODO', + 'components' => 'VEVENT,VTODO,VJOURNAL', 'displayname' => $calendarUri ]; diff --git a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php index a7ca36ba99486..946a2328bf8df 100644 --- a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php +++ b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackend.php @@ -154,7 +154,7 @@ protected function createTestCalendar() { $this->assertEquals(self::UNIT_TEST_USER, $calendars[0]['principaluri']); /** @var SupportedCalendarComponentSet $components */ $components = $calendars[0]['{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set']; - $this->assertEquals(['VEVENT','VTODO'], $components->getValue()); + $this->assertEquals(['VEVENT','VTODO','VJOURNAL'], $components->getValue()); $color = $calendars[0]['{http://apple.com/ns/ical/}calendar-color']; $this->assertEquals('#1C4587FF', $color); $this->assertEquals('Example', $calendars[0]['uri']);