Skip to content

Commit

Permalink
Make default calendar only contain VEVENTS
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Citharel <[email protected]>
  • Loading branch information
tcitworld committed Jun 25, 2021
1 parent f734786 commit 4d5bb48
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion apps/dav/lib/HookManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions apps/dav/tests/unit/DAV/HookManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 4d5bb48

Please sign in to comment.