track()
track(payload: Record<string, any>, opts?: Record<string, any>): Promise<"ok" | "timed out" | "error">
Publish this client's Presence so other subscribers with Presence enabled can see it.
Parameters
payload
object
State to sync, such as { user_id, name }
opts
object
Send options
Response
Promise
"ok" | "timed out" | "error"
Send result
Example
await channel.track({ user_id: 1, name: "Ada" });