diff options
author | Marcel Müller <marcel-mueller@gmx.de> | 2024-12-01 22:22:38 +0100 |
---|---|---|
committer | Marcel Müller <marcel-mueller@gmx.de> | 2024-12-01 23:15:32 +0100 |
commit | 66d4f0e4c0b062a4a0d9e4946dfa673e155c338c (patch) | |
tree | 3056da6e4348f458852926a632636b72623b8fa4 /apps/dav/lib | |
parent | e17f011f08cb4529ae19ff8637a49b7f4e89f216 (diff) | |
download | nextcloud-server-66d4f0e4c0b062a4a0d9e4946dfa673e155c338c.tar.gz nextcloud-server-66d4f0e4c0b062a4a0d9e4946dfa673e155c338c.zip |
chore(absence): Add capability for absence api
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/Capabilities.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/dav/lib/Capabilities.php b/apps/dav/lib/Capabilities.php index b0f63f80f2d..36d56d4a822 100644 --- a/apps/dav/lib/Capabilities.php +++ b/apps/dav/lib/Capabilities.php @@ -7,15 +7,17 @@ namespace OCA\DAV; use OCP\Capabilities\ICapability; use OCP\IConfig; +use OCP\User\IAvailabilityCoordinator; class Capabilities implements ICapability { public function __construct( private IConfig $config, + private IAvailabilityCoordinator $coordinator, ) { } /** - * @return array{dav: array{chunking: string, bulkupload?: string}} + * @return array{dav: array{chunking: string, bulkupload?: string, absence-supported?: bool}} */ public function getCapabilities() { $capabilities = [ @@ -26,6 +28,9 @@ class Capabilities implements ICapability { if ($this->config->getSystemValueBool('bulkupload.enabled', true)) { $capabilities['dav']['bulkupload'] = '1.0'; } + if ($this->coordinator->isEnabled()) { + $capabilities['dav']['absence-supported'] = true; + } return $capabilities; } } |