summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-09-20 10:41:48 +0200
committerJoas Schilling <coding@schilljs.com>2023-09-27 08:55:47 +0200
commitb3af05197bcf02e34041bba00c1ce06de4931f14 (patch)
treeba199792710a6e003460173fbffed9b61ee5cfdc
parent7c2799d7747d49f94b04c6e2b01a96b61796ea55 (diff)
fix(docs): Add capability and documentation
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--docs/capabilities.md1
-rw-r--r--docs/conversation.md33
-rw-r--r--lib/Capabilities.php1
-rw-r--r--tests/php/CapabilitiesTest.php1
4 files changed, 36 insertions, 0 deletions
diff --git a/docs/capabilities.md b/docs/capabilities.md
index 9bcf87519..909f9b1b3 100644
--- a/docs/capabilities.md
+++ b/docs/capabilities.md
@@ -129,4 +129,5 @@
## 18
* `session-state` - Sessions can mark themselves as inactive, so the participant receives notifications again
+* `note-to-self` - Support for "Note-to-self" conversation exists
* `config => chat => has-translation-providers` - When true, translation tuples can be loaded from the [OCS Translation API](https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-translation-api.html#get-available-translation-options).
diff --git a/docs/conversation.md b/docs/conversation.md
index 3bfdf3dcb..e5f2e62d3 100644
--- a/docs/conversation.md
+++ b/docs/conversation.md
@@ -154,6 +154,39 @@
- Data: See array definition in `Get user´s conversations`
+## Get "Note-to-self" conversation
+
+The conversation is like a group conversation and the user is the owner, but with the following limitations:
+
+* Can not add participants to the conversation
+* Can not allow guests
+* Can not make read-only
+* Can not open the conversations to users or guests
+* Can not change permissions
+* Can not set lobby
+* Can not enable SIP
+* Can not configure breakout rooms
+* Can not call
+
+If the conversation does not exist at the moment, it will be generated and the user added automatically.
+
+* Required capability: `note-to-self`
+* Method: `GET`
+* Endpoint: `/room/note-to-self`
+
+* Response:
+ - Status code:
+ + `200 OK`
+ + `401 Unauthorized` When the user is not logged in
+
+ - Header:
+
+| field | type | Description |
+|-------------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `X-Nextcloud-Talk-Hash` | string | Sha1 value over some config. When you receive a different value on subsequent requests, the capabilities and the signaling settings should be refreshed. |
+
+ - Data: See array definition in `Get user´s conversations`
+
## Get open conversations
* Required capability: `listable-rooms`
diff --git a/lib/Capabilities.php b/lib/Capabilities.php
index d852e3086..21b023618 100644
--- a/lib/Capabilities.php
+++ b/lib/Capabilities.php
@@ -123,6 +123,7 @@ class Capabilities implements IPublicCapability {
'bots-v1',
'markdown-messages',
'session-state',
+ 'note-to-self',
],
'config' => [
'attachments' => [
diff --git a/tests/php/CapabilitiesTest.php b/tests/php/CapabilitiesTest.php
index f73af9c78..1d192aac7 100644
--- a/tests/php/CapabilitiesTest.php
+++ b/tests/php/CapabilitiesTest.php
@@ -140,6 +140,7 @@ class CapabilitiesTest extends TestCase {
'bots-v1',
'markdown-messages',
'session-state',
+ 'note-to-self',
'message-expiration',
'reactions',
];