From 303a21fc9d1c702b452d71b39cf21deecaedaef8 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 36d56d4a822e1..ab4e53fce3717 100644 --- a/apps/dav/lib/Capabilities.php +++ b/apps/dav/lib/Capabilities.php @@ -17,7 +17,7 @@ public function __construct( } /** - * @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 = [ @@ -30,6 +30,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());