mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 14:23:17 -04: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
66d4f0e4c0
commit
303a21fc9d
3 changed files with 6 additions and 1 deletions
|
|
@ -17,7 +17,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 = [
|
||||
|
|
@ -30,6 +30,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