From 8191295f66cdea5da7854bfad01ad9540c4a55f4 Mon Sep 17 00:00:00 2001 From: Richard Steinmetz Date: Mon, 13 Nov 2023 17:36:24 +0100 Subject: feat(dav): dispatch out-of-office started and ended events Signed-off-by: Richard Steinmetz --- lib/private/User/AvailabilityCoordinator.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/private/User') diff --git a/lib/private/User/AvailabilityCoordinator.php b/lib/private/User/AvailabilityCoordinator.php index 8e6b73bd56d..e33a0aa1558 100644 --- a/lib/private/User/AvailabilityCoordinator.php +++ b/lib/private/User/AvailabilityCoordinator.php @@ -28,6 +28,7 @@ namespace OC\User; use JsonException; use OCA\DAV\AppInfo\Application; +use OCA\DAV\CalDAV\TimezoneService; use OCA\DAV\Db\AbsenceMapper; use OCP\AppFramework\Db\DoesNotExistException; use OCP\ICache; @@ -46,6 +47,7 @@ class AvailabilityCoordinator implements IAvailabilityCoordinator { private AbsenceMapper $absenceMapper, private IConfig $config, private LoggerInterface $logger, + private TimezoneService $timezoneService, ) { $this->cache = $cacheFactory->createLocal('OutOfOfficeData'); } @@ -115,7 +117,10 @@ class AvailabilityCoordinator implements IAvailabilityCoordinator { return null; } - $data = $absenceData->toOutOufOfficeData($user); + $data = $absenceData->toOutOufOfficeData( + $user, + $this->timezoneService->getUserTimezone($user->getUID()) ?? $this->timezoneService->getDefaultTimezone(), + ); $this->setCachedOutOfOfficeData($data); return $data; } -- cgit v1.2.3