Skip to content

Commit

Permalink
[core] Fix set presence documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
allburov committed Feb 12, 2024
1 parent 0271a8b commit 074063b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/site/content/en/docs/how-to/engines/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ please [create an issue](https://github.com/devlikeapro/whatsapp-http-api/issues
| | WEBJS | NOWEB | VENOM |
|---------------------------------------------------|:-----:|:-----:|:-----:|
| **Presence** | | | |
| `POST /api/{session}/presence` | | ✔️ ||
| `POST /api/{session}/presence` | ✔️ | ✔️ ||
| `GET /api/{session}/presence` || ✔️ ||
| `GET /api/{session}/presence/{chatId}` || ✔️ ||
| `POST /api/{session}/presence/{chatId}/subscribe` || ✔️ ||
Expand Down
12 changes: 8 additions & 4 deletions docs/site/content/en/docs/how-to/presence/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,26 @@ See the list of engines [**that support the feature ->**]({{< relref "/docs/how-
You can set your global or chat-related presence with `POST /api/{session}/presence` endpoint

Start typing to a chat (you can use `POST /startTyping` instead)
```json
```
POST /api/{session}/presence
{
"chatId": "[email protected]",
"presence": "typing"
}
```

Clear "typing" state (you can use `POST /stopTyping` instead)
```json
```
POST /api/{session}/presence
{
"chatId": "[email protected]",
"presence": "paused"
}
```

Set global "online", all contacts will see it
```json
```
POST /api/{session}/presence
{
"presence": "online"
}
Expand All @@ -53,7 +56,8 @@ Set global "online", all contacts will see it
to the device.
If you would like to receive said notifications - you need to mark a session's presence as `offline`.

```json
```
POST /api/{session}/presence
{
"presence": "offline"
}
Expand Down

0 comments on commit 074063b

Please sign in to comment.