Send presence update
Update your presence status or send typing indicators.The type of presence to send:
available- Mark yourself as onlineunavailable- Mark yourself as offlinecomposing- Show typing indicatorrecording- Show recording audio indicatorpaused- Stop typing/recording indicator
The JID of the chat where the presence update should be sent. Required for typing/recording indicators, optional for available/unavailable.
When sending
available or unavailable, the presence is broadcast globally. For typing indicators (composing, recording, paused), you must specify the target chat JID.Subscribe to presence updates
Request to receive presence updates for a specific user or chat.The JID of the user or chat to subscribe to for presence updates
Handle presence updates
Listen for incoming presence updates from other users.You must call
presenceSubscribe() for a user before you can receive their presence updates. The presence.update event will fire whenever the subscribed user’s presence changes.Presence types
Available presence types
Available presence types
- available - User is online/active
- unavailable - User is offline
- composing - User is typing a message
- recording - User is recording audio
- paused - User stopped typing/recording