feat: add message storage and fetching api #21

Merged
hippoz merged 4 commits from message-history into master 2021-10-03 21:20:29 +03:00
Showing only changes of commit 50cc87b399 - Show all commits

View file

@ -26,11 +26,15 @@ Packets can also have JSON as a payload:
Sent by the server to the client as soon as possible after they connect to the gateway.
This payload contains a `pingInterval` property. Every *pingInterval*, the client must send a packet simply containing `7@1`. This is the ACTION_PING payload. If the client does not send this payload at the right time, it is disconnected.
JSON data format:
| Field | Description |
| - | - |
| pingInterval | Every *pingInterval*, the client must send a packet simply containing `7@1`. This is the ACTION_PING payload. If the client does not send this payload at the right time, it is disconnected. |
| supportedAttributes | An array of attributes supported by the server. If a client requests an unsupported attribute, it is disconnected from the server. |
Example:
```json
0@{"pingInterval":14750}
0@{"pingInterval":14750,"supportedAttributes":["PRESENCE_UPDATES"]}
```
## 1:YOO
@ -194,7 +198,7 @@ Voice server signaling is done through a websocket gateway. This gateway is spec
| content | The text content of the message (max 2000 characters, min 1 character, trimmed) |
| channel | A [message channel object](#message-channel-object) |
| author | A [message author object](#message-author-object) |
| _id | A UUIDv4 |
| _id | An ObjectId |
## Message channel object