diff options
author | Vitor Mattos <vitor@php.rio> | 2022-05-05 20:48:13 -0300 |
---|---|---|
committer | Vitor Mattos <vitor@php.rio> | 2022-06-30 15:01:23 -0300 |
commit | a8b9a87b40db64fe5d4f46f65dd2d21c948c6b8c (patch) | |
tree | 089ddb00d22ebbc40dd82b14ed3c027c49debcf4 | |
parent | 57b28f64d6b02a7879da51e7c264a87472e94ed8 (diff) |
Documentation
Signed-off-by: Vitor Mattos <vitor@php.rio>
-rw-r--r-- | docs/capabilities.md | 1 | ||||
-rw-r--r-- | docs/conversation.md | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/docs/capabilities.md b/docs/capabilities.md index ce4507633..ef67a04ad 100644 --- a/docs/capabilities.md +++ b/docs/capabilities.md @@ -102,3 +102,4 @@ title: Capabilities * `silent-call` - Allow to start calls without sending notification * `config => call => enabled` - Whether calling is enabled on the instance or not * `config => signaling => session-ping-limit` - Number of sessions the HPB is allowed to ping in the same request +* `time-to-live` - Time to live of messages for a conversation diff --git a/docs/conversation.md b/docs/conversation.md index 54a6b7ed6..893cb395d 100644 --- a/docs/conversation.md +++ b/docs/conversation.md @@ -51,6 +51,7 @@ `participantFlags` | int | v1 | | "In call" flags of the user's session making the request (only available with `in-call-flags` capability) `readOnly` | int | v1 | | Read-only state for the current user (only available with `read-only-rooms` capability) `listable` | int | v3 | | Listable scope for the room (only available with `listable-rooms` capability) + `timeToLive` | int | v4 | | The time to live of messages in this chat. Zero if disabled. (only available with `time-to-live` capability) `count` | int | v1 | v2 | **Removed:** Count the users on the [Get list of participants in a conversation](participant.md#get-list-of-participants-in-a-conversation) endpoint `numGuests` | int | v1 | v2 | **Removed:** Count the guests on the [Get list of participants in a conversation](participant.md#get-list-of-participants-in-a-conversation) endpoin `lastPing` | int | v1 | | Timestamp of the user's session making the request @@ -336,6 +337,24 @@ + `401 Unauthorized` When the participant is a guest + `404 Not Found` When the conversation could not be found for the participant +## Set time to live for messages in a conversation + +* Required capability: `time-to-live` +* Method: `POST` +* Endpoint: `/room/{token}/ttl` +* Data: + + field | type | Description + ---|---|--- + `ttl` | int | The time to live for messages in seconds. If is zero, messages will not be deleted automatically. + +* Response: + - Status code: + + `200 OK` + + `400 Bad Request` Invalid value + + `403 Forbidden` When the current user is not a moderator, owner or guest moderator + + `404 Not Found` When the conversation could not be found for the participant + ## Open a conversation * Required capability: `listable-rooms` |