Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f2f8718 authored by AVINASH GUSAIN's avatar AVINASH GUSAIN
Browse files

task calendar created

parent 6ca0c69a
Loading
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
From: Avinash Gusain <avinash.gusain.ext@murena.com>
Date: Fri, 16 June 2023 18:50:00 +0530
Subject: [PATCH] Create a task calendar on first login

This patch creates a default task VTODO calender on first login

--- ./apps/dav/lib/HookManager.php	2023-06-16 19:01:35.894535512 +0530
+++ ./apps/dav/lib/HookManager-new.php	2023-06-16 19:07:09.374531373 +0530
@@ -179,6 +179,11 @@
 						'{http://apple.com/ns/ical/}calendar-color' => $this->themingDefaults->getColorPrimary(),
 						'components' => 'VEVENT'
 					]);
+					$this->calDav->createCalendar($principal, 'tasks', [
+						'{DAV:}displayname' => 'Tasks',
+						'{http://apple.com/ns/ical/}calendar-color' => $this->themingDefaults->getColorPrimary(),
+						'components' => 'VTODO'
+					]);
 				} catch (\Exception $e) {
 					\OC::$server->get(LoggerInterface::class)->error($e->getMessage(), ['exception' => $e]);
 				}