Merge branch 'master' of https://git.hippoz.xyz/hippoz/brainlet
this merge is necessary because git told me to do it
This commit is contained in:
commit
51e7a46821
1 changed files with 5 additions and 3 deletions
|
@ -47,7 +47,7 @@ JSON data format:
|
||||||
| Field | Description |
|
| Field | Description |
|
||||||
| - | - |
|
| - | - |
|
||||||
| token | The authentication token |
|
| token | The authentication token |
|
||||||
| client | The name of the application the client is connecting from (e.g. browser_react_app) |
|
| client? | The name of the application the client is connecting from (see below) |
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
```json
|
```json
|
||||||
|
@ -56,6 +56,8 @@ Example:
|
||||||
|
|
||||||
If the token is invalid, or the connection is otherwise rejected, the client should be disconnected as soon as possible, and no YOO\_ACK should be sent.
|
If the token is invalid, or the connection is otherwise rejected, the client should be disconnected as soon as possible, and no YOO\_ACK should be sent.
|
||||||
|
|
||||||
|
It is suggested that the field "client" is send in the format of "(operating system)/(user agent vendor)/(user agent)/(optional full user agent string)", example: "Linux/Mozilla/Firefox/some firefox useragent string idk"
|
||||||
|
|
||||||
## 2:YOO\_ACK
|
## 2:YOO\_ACK
|
||||||
*Part of handshake, Server to client*
|
*Part of handshake, Server to client*
|
||||||
|
|
||||||
|
@ -81,7 +83,7 @@ JSON data format:
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
```json
|
```json
|
||||||
3@{"content":"i hate you","channel_id":"totally real channel id"}
|
3@{"content":"i hate you","channel":{"_id":"totally real channel id"}}
|
||||||
```
|
```
|
||||||
|
|
||||||
## 4:EVENT\_NEW\_MESSAGE
|
## 4:EVENT\_NEW\_MESSAGE
|
||||||
|
@ -112,7 +114,7 @@ Example:
|
||||||
|
|
||||||
*Auth required, Server to client*
|
*Auth required, Server to client*
|
||||||
|
|
||||||
Sent by the server after YOO\_ACK, and otherwise when the entire status needs to be updated. If only one user's status changes, use EVENT\_CHANNEL\_MEMBER\_UPDATE.
|
Sent by the server after YOO\_ACK, and otherwise when the entire status needs to be updated. Usually, this will be sent only once, and when subsequent user status updates need to happen, EVENT\_CHANNEL\_MEMBER\_UPDATE should be sent.
|
||||||
|
|
||||||
JSON data format (this ones tough):
|
JSON data format (this ones tough):
|
||||||
Contains a JSON object, where each key is a channel id and each property is an array of [user presence objects](#user-presence-object).
|
Contains a JSON object, where each key is a channel id and each property is an array of [user presence objects](#user-presence-object).
|
||||||
|
|
Reference in a new issue