Skip to content

Commit 609cc61

Browse files
committed
9.5
1 parent 5d6c5bb commit 609cc61

File tree

4 files changed

+32
-39
lines changed

4 files changed

+32
-39
lines changed

content/docs/how-to/events/index.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -627,26 +627,8 @@ revokes a previously sent message.
627627

628628
### presence.update
629629

630-
- `payload.id` indicates the chat - either direct chat with a contact or a group chat.
631-
- `payload.id.[].participant` - certain participant presence status. For a direct chat there's only one participant.
630+
{{< include file="content/docs/how-to/presence/-events-presence.update.md" >}}
632631

633-
```jsonc { title="presence.update" }
634-
{
635-
"event": "presence.update",
636-
"session": "default",
637-
"engine": "NOWEB",
638-
"payload": {
639-
"id": "111111111111111111@g.us",
640-
"presences": [
641-
{
642-
"participant": "11111111111@c.us",
643-
"lastKnownPresence": "typing",
644-
"lastSeen": null
645-
}
646-
]
647-
}
648-
}
649-
```
650632

651633
### poll.vote
652634
We have a dedicated page [how to send polls and receive votes]({{< relref "/docs/how-to/polls" >}})!
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<div></div>
2+
3+
You can subscribe to `presence.update` webhook event to get the most recent presence information.
4+
5+
```jsonc { title="presence.update" }
6+
{
7+
"event": "presence.update",
8+
"session": "default",
9+
"payload": {
10+
"id": "111111111111111111@g.us",
11+
"presences": [
12+
{
13+
"participant": "11111111111@c.us",
14+
"lastKnownPresence": "typing",
15+
"lastSeen": null
16+
}
17+
]
18+
},
19+
"engine": "NOWEB"
20+
}
21+
```
22+
23+
- `payload.id` indicates the chat - either direct chat with a contact or a group chat.
24+
- `payload.id.[].participant` - certain participant presence status. For a direct chat there's only one participant.
25+
- `lastKnownPresence` statuses that you can set or get for chats:
26+
- `online`
27+
- `offline`
28+
- `typing`
29+
- `recording`
30+
- `paused`

content/docs/how-to/presence/index.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -177,22 +177,4 @@ Read more about
177177

178178
### presence.update
179179

180-
You can subscribe to `presence.update` webhook event to get the most recent presence information.
181-
182-
```jsonc { title="presence.update" }
183-
{
184-
"event": "presence.update",
185-
"session": "default",
186-
"payload": {
187-
"id": "111111111111111111@g.us",
188-
"presences": [
189-
{
190-
"participant": "11111111111@c.us",
191-
"lastKnownPresence": "typing",
192-
"lastSeen": null
193-
}
194-
]
195-
},
196-
"engine": "NOWEB"
197-
}
198-
```
180+
{{< include file="content/docs/how-to/presence/-events-presence.update.md" >}}

hugo_stats.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,6 @@
496496
"and-more",
497497
"announcement",
498498
"api",
499-
"api---contacts",
500499
"api---lids",
501500
"api-key",
502501
"api-security",

0 commit comments

Comments
 (0)