summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2023-03-07 13:12:33 +0100
committerJoas Schilling <coding@schilljs.com>2023-03-07 13:12:33 +0100
commit4d80bba587156def7561bea9435ffe18c9c9dfd3 (patch)
tree24122725226686056b4896dedc3ca1bfab8128d0 /docs
parent30b86548fc0faef4854e7c9426cf9684cf0a00d4 (diff)
fix(docs): Document object types of conversations
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/constants.md8
-rw-r--r--docs/conversation.md22
2 files changed, 19 insertions, 11 deletions
diff --git a/docs/constants.md b/docs/constants.md
index 340eba1f9..4ea1670cf 100644
--- a/docs/constants.md
+++ b/docs/constants.md
@@ -9,6 +9,14 @@
* `4` Changelog
* `5` Former "One to one" (When a user is deleted from the server or removed from all their conversations, `1` "One to one" rooms are converted to this type)
+### Object types
+
+| Constant | Can be created | Description | Object ID |
+|------------------|----------------|------------------------------------------------------------------|---------------------------------------|
+| `file` | No | Conversations about a file in the right sidebar of the files app | File ID |
+| `share:password` | No | Video verification to verify the identity of the share recipient | Share token |
+| `room` | Yes | Room is a breakout room | Token of the main/parent conversation |
+
### Read-only states
* `0` Read-write
* `1` Read-only
diff --git a/docs/conversation.md b/docs/conversation.md
index 4083bf491..22eeb1a69 100644
--- a/docs/conversation.md
+++ b/docs/conversation.md
@@ -93,8 +93,8 @@
| `lastReadMessage` | int | v1 | | ID of the last read message in a room (only available with `chat-read-marker` capability) |
| `lastCommonReadMessage` | int | v3 | | ID of the last message read by every user that has read privacy set to public in a room. When the user themself has it set to private the value is `0` (only available with `chat-read-status` capability) |
| `lastMessage` | message | v1 | | Last message in a conversation if available, otherwise empty. **Note:** Even when given the message will not contain the `parent` or `reactionsSelf` attribute due to performance reasons |
-| `objectType` | string | v1 | | The type of object that the conversation is associated with; "share:password" if the conversation is used to request a password for a share, otherwise empty |
-| `objectId` | string | v1 | | Share token if "objectType" is "share:password", otherwise empty |
+| `objectType` | string | v1 | | The type of object that the conversation is associated with (See [Object types](constants.md#object-types)) |
+| `objectId` | string | v1 | | See [Object types](constants.md#object-types) documentation for explanation |
| `breakoutRoomMode` | string | v4 | | Breakout room configuration mode (see [constants list](constants.md#breakout-room-modes)) (only available with `breakout-rooms-v1` capability) |
| `breakoutRoomStatus` | string | v4 | | Breakout room status (see [constants list](constants.md#breakout-room-status)) (only available with `breakout-rooms-v1` capability) |
| `status` | string | v4 | | Optional: Only available for one-to-one conversations and when `includeStatus=true` is set |
@@ -108,20 +108,20 @@
## Creating a new conversation
-*Note:* Creating a conversation as a child breakout room, will automatically set the lobby when breakout rooms are not started and will always overwrite the room type with the parent room type. Also moderators of the parent conversation will be automatically added as moderators.
+*Note:* Creating a conversation as a child breakout room, will automatically set the lobby when breakout rooms are not started and will always overwrite the room type with the parent room type. Also, moderators of the parent conversation will be automatically added as moderators.
* Method: `POST`
* Endpoint: `/room`
* Data:
-| field | type | Description |
-|--------------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| `roomType` | int | See [constants list](constants.md#conversation-types) |
-| `invite` | string | user id (`roomType = 1`), group id (`roomType = 2` - optional), circle id (`roomType = 2`, `source = 'circles'`], only available with `circles-support` capability)) |
-| `source` | string | The source for the invite, only supported on `roomType = 2` for `groups` and `circles` (only available with `circles-support` capability) |
-| `roomName` | string | Conversation name up to 255 characters (Not available for `roomType = 1`) |
-| `objectType` | string | Type of an object this room references, currently only allowed value is `room` to indicate the parent of a breakout room |
-| `objectId` | string | Id of an object this room references, room token is used for the parent of a breakout room |
+| field | type | Description |
+|--------------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `roomType` | int | See [constants list](constants.md#conversation-types) |
+| `invite` | string | user id (`roomType = 1`), group id (`roomType = 2` - optional), circle id (`roomType = 2`, `source = 'circles'`], only available with `circles-support` capability)) |
+| `source` | string | The source for the invite, only supported on `roomType = 2` for `groups` and `circles` (only available with `circles-support` capability) |
+| `roomName` | string | Conversation name up to 255 characters (Not available for `roomType = 1`) |
+| `objectType` | string | Type of an object this room references, currently only allowed value is `room` to indicate the parent of a breakout room (See [Object types](constants.md#object-types)) |
+| `objectId` | string | Id of an object this room references, room token is used for the parent of a breakout room |
* Response:
- Status code: