diff options
author | Vitor Mattos <vitor@php.rio> | 2021-12-16 14:20:35 +0300 |
---|---|---|
committer | Vitor Mattos <vitor@php.rio> | 2022-02-15 18:45:40 +0300 |
commit | 3b30c900cbdc399cae93c2b26ad9b466179d1f82 (patch) | |
tree | 533e8ce216b32d74a84a94ee9027cffe2fa613b3 /docs | |
parent | 213d9ea9621133167a63f87f4fb7b784c1321090 (diff) |
Api changes to react to a message: reactions add
Signed-off-by: Vitor Mattos <vitor@php.rio>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/chat.md | 2 | ||||
-rw-r--r-- | docs/index.md | 1 | ||||
-rw-r--r-- | docs/reaction.md | 20 |
3 files changed, 23 insertions, 0 deletions
diff --git a/docs/chat.md b/docs/chat.md index ff03979ef..dd496a7b4 100644 --- a/docs/chat.md +++ b/docs/chat.md @@ -50,6 +50,7 @@ Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1` `message` | string | Message string with placeholders (see [Rich Object String](https://github.com/nextcloud/server/issues/1706)) `messageParameters` | array | Message parameters for `message` (see [Rich Object String](https://github.com/nextcloud/server/issues/1706)) `parent` | array | **Optional:** See `Parent data` below + `reactions` | array | **Optional:** An array map with relation between reaction emoji and total of reactions with this emoji #### Parent data @@ -324,3 +325,4 @@ See [OCP\RichObjectStrings\Definitions](https://github.com/nextcloud/server/blob * `matterbridge_config_removed` - {actor} removed the Matterbridge configuration * `matterbridge_config_enabled` - {actor} started Matterbridge * `matterbridge_config_disabled` - {actor} stopped Matterbridge + diff --git a/docs/index.md b/docs/index.md index 0e19b823f..3e1dec1dc 100644 --- a/docs/index.md +++ b/docs/index.md @@ -16,6 +16,7 @@ * [Participant API](participant.md) * [Call API](call.md) * [Chat API](chat.md) +* [Reaction API](reaction.md) * [Webinar API](webinar.md) * [Internal Signaling API](internal-signaling.md) * [Standalone Signaling API](https://nextcloud-spreed-signaling.readthedocs.io/en/latest/) diff --git a/docs/reaction.md b/docs/reaction.md new file mode 100644 index 000000000..54a58b75a --- /dev/null +++ b/docs/reaction.md @@ -0,0 +1,20 @@ +# Reaction API + +Base endpoint is: `/ocs/v2.php/apps/spreed/api/v1` + +## React to a message + +* Method: `POST` +* Endpoint: `/chat/{token}/{messageId}` +* Data: + + field | type | Description + ---|---|--- + `reaction` | string | the reaction emoji + +* Response: + - Status code: + + `201 Created` + + `400 Bad Request` In case of any other error + + `404 Not Found` When the conversation or message to react could not be found for the participant + + `409 Conflict` User already did this reaction to this message |