Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2021-05-31 17:44:09 +0300
committerGitHub <noreply@github.com>2021-05-31 17:44:09 +0300
commit6e995e6a2b0f8f36bd5c1248c4fe628fe6cd299f (patch)
tree281786d9718c2771b4811f26575994bb8d6fab11 /docs
parentcc98dbdb6de9f49e4277a177d4e0f7fee0dcd13e (diff)
parent61aa4e33b55782cb7859cb198c0cecb35d5a9adf (diff)
Merge pull request #5616 from nextcloud/feature/1576/allow-to-specify-meta-data-on-a-share
Allow to specify meta-data for sharing
Diffstat (limited to 'docs')
-rw-r--r--docs/chat.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/chat.md b/docs/chat.md
index ceb4b608f..d3da178b8 100644
--- a/docs/chat.md
+++ b/docs/chat.md
@@ -131,6 +131,28 @@ See [OCP\RichObjectStrings\Definitions](https://github.com/nextcloud/server/blob
- Data:
The full message array of the new message, as defined in [Receive chat messages of a conversation](#receive-chat-messages-of-a-conversation)
+## Share a file to the chat
+
+* Method: `POST`
+* Endpoint: `ocs/v2.php/apps/files_sharing/api/v1/shares`
+* Data:
+
+ field | type | Description
+ ---|---|---
+ `shareType` | int | `10` means share to a conversation
+ `shareWith` | string | The token of the conversation to share the file to
+ `path` | string | The file path inside the user's root to share
+ `referenceId` | string | A reference string to be able to identify the generated chat message again in a "get messages" request, should be a random sha256 (only available with `chat-reference-id` capability)
+ `talkMetaData` | string | JSON encoded array of the meta data
+
+* `talkMetaData` array:
+
+ field | type | Description
+ ---|---|---
+ `messageType` | string | A message type to show the message in different styles. Currently known: `voice-message` and `comment`
+
+* Response: [See official OCS Share API docs](https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-share-api.html?highlight=sharing#create-a-new-share)
+
## Deleting a chat message
* Required capability: `delete-messages`