mirror of
https://github.com/nextcloud/server.git
synced 2025-03-12 23:47:25 +00:00
chore(absence): Add capability for absence replacement support
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
This commit is contained in:
parent
235e1fb878
commit
c3fa1e4a25
3 changed files with 6 additions and 1 deletions
apps/dav
|
@ -19,7 +19,7 @@ class Capabilities implements ICapability {
|
|||
}
|
||||
|
||||
/**
|
||||
* @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 @@ class Capabilities implements ICapability {
|
|||
}
|
||||
if ($this->coordinator->isEnabled()) {
|
||||
$capabilities['dav']['absence-supported'] = true;
|
||||
$capabilities['dav']['absence-replacement'] = true;
|
||||
}
|
||||
return $capabilities;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,9 @@
|
|||
},
|
||||
"absence-supported": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"absence-replacement": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,6 +68,7 @@ class CapabilitiesTest extends TestCase {
|
|||
'dav' => [
|
||||
'chunking' => '1.0',
|
||||
'absence-supported' => true,
|
||||
'absence-replacement' => true,
|
||||
],
|
||||
];
|
||||
$this->assertSame($expected, $capabilities->getCapabilities());
|
||||
|
|
Loading…
Reference in a new issue