Skip to content

Commit

Permalink
docs(guides/channels): fix channel sessionCount property link
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewWid committed Oct 29, 2024
1 parent 87b5262 commit c8c02ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/content/docs/guides/channels.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ ticker
.on("session-deregistered", broadcastSessionCount);
```
Here we create a function `broadcastSessionCount` that broadcasts a value with the current total session count exposed to us under the [Channel `sessionCount` property](./api.md#channelsessioncount-number) with the event name `session-count`.
Here we create a function `broadcastSessionCount` that broadcasts a value with the current total session count exposed to us under the [Channel `sessionCount` property](/better-sse/reference/api/#channelsessioncount-number) with the event name `session-count`.
We then listen on both the events `session-registered` and `session-deregistered` and set the `broadcastSessionCount` function as a callback for each. This way, every time a session joins or leaves the channel the count is re-broadcasted and updated for all of the existing sessions on the channel.
Expand Down

0 comments on commit c8c02ec

Please sign in to comment.