From 4d5bb4823159edc3fb636357edd7bd6f7fea57d5 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 15 Sep 2019 13:24:09 +0200 Subject: [PATCH] Make default calendar only contain VEVENTS Signed-off-by: Thomas Citharel --- apps/dav/lib/HookManager.php | 3 ++- apps/dav/tests/unit/DAV/HookManagerTest.php | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/dav/lib/HookManager.php b/apps/dav/lib/HookManager.php index 6886a62d8e9ff..a5c5087a8565d 100644 --- a/apps/dav/lib/HookManager.php +++ b/apps/dav/lib/HookManager.php @@ -162,7 +162,8 @@ public function firstLogin(IUser $user = null) { try { $this->calDav->createCalendar($principal, CalDavBackend::PERSONAL_CALENDAR_URI, [ '{DAV:}displayname' => CalDavBackend::PERSONAL_CALENDAR_NAME, - '{http://apple.com/ns/ical/}calendar-color' => $this->themingDefaults->getColorPrimary() + '{http://apple.com/ns/ical/}calendar-color' => $this->themingDefaults->getColorPrimary(), + 'components' => 'VEVENT' ]); } catch (\Exception $ex) { \OC::$server->getLogger()->logException($ex); diff --git a/apps/dav/tests/unit/DAV/HookManagerTest.php b/apps/dav/tests/unit/DAV/HookManagerTest.php index e86c84e56deb4..d3cdfbf68f7ad 100644 --- a/apps/dav/tests/unit/DAV/HookManagerTest.php +++ b/apps/dav/tests/unit/DAV/HookManagerTest.php @@ -92,7 +92,8 @@ public function test() { 'principals/users/newUser', 'personal', [ '{DAV:}displayname' => 'Personal', - '{http://apple.com/ns/ical/}calendar-color' => '#745bca' + '{http://apple.com/ns/ical/}calendar-color' => '#745bca', + 'components' => 'VEVENT' ]); /** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject $card */ @@ -178,7 +179,8 @@ public function testWithBirthdayCalendar() { 'principals/users/newUser', 'personal', [ '{DAV:}displayname' => 'Personal', - '{http://apple.com/ns/ical/}calendar-color' => '#745bca' + '{http://apple.com/ns/ical/}calendar-color' => '#745bca', + 'components' => 'VEVENT' ]); /** @var CardDavBackend | \PHPUnit\Framework\MockObject\MockObject $card */