feat(userstatus): add busy capability

Signed-off-by: Anna Larch <anna@nextcloud.com>
This commit is contained in:
Anna Larch 2025-08-04 17:07:46 +02:00
parent 2aa6894c38
commit b819d71337
4 changed files with 13 additions and 3 deletions

View file

@ -23,7 +23,7 @@ class Capabilities implements ICapability {
}
/**
* @return array{user_status: array{enabled: bool, restore: bool, supports_emoji: bool}}
* @return array{user_status: array{enabled: bool, restore: bool, supports_emoji: bool, supports_busy: bool}}
*/
public function getCapabilities() {
return [
@ -31,6 +31,7 @@ class Capabilities implements ICapability {
'enabled' => true,
'restore' => true,
'supports_emoji' => $this->emojiHelper->doesPlatformSupportEmoji(),
'supports_busy' => true,
],
];
}

View file

@ -31,7 +31,8 @@
"required": [
"enabled",
"restore",
"supports_emoji"
"supports_emoji",
"supports_busy"
],
"properties": {
"enabled": {
@ -42,6 +43,9 @@
},
"supports_emoji": {
"type": "boolean"
},
"supports_busy": {
"type": "boolean"
}
}
}

View file

@ -35,6 +35,7 @@ class CapabilitiesTest extends TestCase {
'enabled' => true,
'restore' => true,
'supports_emoji' => $supportsEmojis,
'supports_busy' => true,
]
], $this->capabilities->getCapabilities());
}

View file

@ -4185,7 +4185,8 @@
"required": [
"enabled",
"restore",
"supports_emoji"
"supports_emoji",
"supports_busy"
],
"properties": {
"enabled": {
@ -4196,6 +4197,9 @@
},
"supports_emoji": {
"type": "boolean"
},
"supports_busy": {
"type": "boolean"
}
}
}