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 <[email protected]>
  • Loading branch information
SystemKeeper committed Dec 13, 2024
1 parent 235e1fb commit c3fa1e4
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 @@ -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 = [
Expand All @@ -32,6 +32,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 c3fa1e4

Please sign in to comment.