From 4b0988b52b2e0b035ef49eda36108f3c2216c57f Mon Sep 17 00:00:00 2001 From: Lukas Schaefer Date: Mon, 26 Jan 2026 11:08:24 -0500 Subject: [PATCH] Fix calendar display name Signed-off-by: Lukas Schaefer --- lib/Service/GoogleCalendarAPIService.php | 4 ++++ psalm-baseline.xml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/lib/Service/GoogleCalendarAPIService.php b/lib/Service/GoogleCalendarAPIService.php index e56b2056..fb079a8f 100644 --- a/lib/Service/GoogleCalendarAPIService.php +++ b/lib/Service/GoogleCalendarAPIService.php @@ -24,6 +24,7 @@ use Ortic\ColorConverter\Colors\Named; use Psr\Log\LoggerInterface; use Sabre\DAV\Exception\BadRequest; +use Sabre\DAV\PropPatch; use Sabre\VObject\Component\VCalendar; use Sabre\VObject\Component\VEvent; use Sabre\VObject\Reader; @@ -320,6 +321,9 @@ public function importCalendar(string $userId, string $calId, string $calName, ? $calendarIsNew = is_null($ncCalId); if (is_null($ncCalId)) { $ncCalId = $this->caldavBackend->createCalendar('principals/users/' . $userId, $newCalUri, $params); + // Ensures the right name is given to the calendar + $proppatch = new PropPatch(['{DAV:}displayname' => $newCalName]); + $this->caldavBackend->updateCalendar($ncCalId, $proppatch); } // get color list diff --git a/psalm-baseline.xml b/psalm-baseline.xml index a96d5b28..16d1548b 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -89,12 +89,14 @@ caldavBackend]]> caldavBackend]]> caldavBackend]]> + caldavBackend]]> +