From c3fa1e4a257c160a142f0ed56997264851ade841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Sun, 1 Dec 2024 22:23:51 +0100 Subject: [PATCH] chore(absence): Add capability for absence replacement support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- apps/dav/lib/Capabilities.php | 3 ++- apps/dav/openapi.json | 3 +++ apps/dav/tests/unit/CapabilitiesTest.php | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/dav/lib/Capabilities.php b/apps/dav/lib/Capabilities.php index 63f10eab58fe3..c951c261115ce 100644 --- a/apps/dav/lib/Capabilities.php +++ b/apps/dav/lib/Capabilities.php @@ -19,7 +19,7 @@ public function __construct(IConfig $config, IAvailabilityCoordinator $coordinat } /** - * @return array{dav: array{chunking: string, bulkupload?: string, absence-supported?: bool}} + * @return array{dav: array{chunking: string, bulkupload?: string, absence-supported?: bool, absence-replacement?: bool}} */ public function getCapabilities() { $capabilities = [ @@ -32,6 +32,7 @@ public function getCapabilities() { } if ($this->coordinator->isEnabled()) { $capabilities['dav']['absence-supported'] = true; + $capabilities['dav']['absence-replacement'] = true; } return $capabilities; } diff --git a/apps/dav/openapi.json b/apps/dav/openapi.json index e212796304d42..cb7dc82c0396e 100644 --- a/apps/dav/openapi.json +++ b/apps/dav/openapi.json @@ -40,6 +40,9 @@ }, "absence-supported": { "type": "boolean" + }, + "absence-replacement": { + "type": "boolean" } } } diff --git a/apps/dav/tests/unit/CapabilitiesTest.php b/apps/dav/tests/unit/CapabilitiesTest.php index 4a2d7e8dba692..e99f7b8da5f77 100644 --- a/apps/dav/tests/unit/CapabilitiesTest.php +++ b/apps/dav/tests/unit/CapabilitiesTest.php @@ -68,6 +68,7 @@ public function testGetCapabilitiesWithAbsence(): void { 'dav' => [ 'chunking' => '1.0', 'absence-supported' => true, + 'absence-replacement' => true, ], ]; $this->assertSame($expected, $capabilities->getCapabilities());