Skip to content

Commit

Permalink
chore(absence): Add capability for absence replacement support
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
  • Loading branch information
SystemKeeper committed Dec 1, 2024
1 parent 6fe41d3 commit f365065
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/dav/lib/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -30,6 +30,7 @@ public function getCapabilities() {
}
if ($this->coordinator->isEnabled()) {
$capabilities['dav']['absence-supported'] = true;
$capabilities['dav']['absence-replacement'] = true;
}
return $capabilities;
}
Expand Down
3 changes: 3 additions & 0 deletions apps/dav/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
},
"absence-supported": {
"type": "boolean"
},
"absence-replacement": {
"type": "boolean"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions apps/dav/tests/unit/CapabilitiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public function testGetCapabilitiesWithAbsence(): void {
'dav' => [
'chunking' => '1.0',
'absence-supported' => true,
'absence-replacement' => true,
],
];
$this->assertSame($expected, $capabilities->getCapabilities());
Expand Down

0 comments on commit f365065

Please sign in to comment.