diff options
author | Richard Steinmetz <richard@steinmetz.cloud> | 2023-11-13 17:36:24 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-11-23 17:18:49 +0100 |
commit | 8191295f66cdea5da7854bfad01ad9540c4a55f4 (patch) | |
tree | 93fd27fe91ab0f40b4c765139a957b420806dedf /lib/private/User | |
parent | 953382e937a4085c1099449b29c40c7aab02fc3e (diff) | |
download | nextcloud-server-8191295f66cdea5da7854bfad01ad9540c4a55f4.tar.gz nextcloud-server-8191295f66cdea5da7854bfad01ad9540c4a55f4.zip |
feat(dav): dispatch out-of-office started and ended events
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Diffstat (limited to 'lib/private/User')
-rw-r--r-- | lib/private/User/AvailabilityCoordinator.php | 7 |
1 files changed, 6 insertions, 1 deletions
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; } |