Overview
Vocantly provides real-time presence tracking and typing indicators to enhance the chat experience.Presence
What is Presence?
Presence tracks whether users are online or offline. It’s automatically managed based on WebSocket connection state.Presence States
Automatic Management
- Connect → User automatically marked
online - Disconnect → User automatically marked
offline - Reconnect → User marked
onlineagain
Using with SDK
Typing Indicators
What are Typing Indicators?
Typing indicators show when a user is composing a message. They are conversation-scoped and automatically expire.Automatic Expiration
Typing indicators expire after 5 seconds. If the user is still typing, the SDK/client should resend to keep the indicator alive.Using with SDK
Best Practices
Presence
Debounce UI Updates
Debounce updates to prevent flickering during reconnection.
Cache State
Cache presence state for quick lookups.
Typing
Debounce Input
Don’t send on every keystroke. Debounce to reduce traffic.
Stop on Send
Always stop typing before sending a message.
Auto-stop Timeout
Stop typing after 2-3 seconds of inactivity.
Visual Feedback
Show subtle animation like ”…” to indicate typing.
Complete Example
Next Steps
SDK Presence
Detailed SDK presence guide
SDK Typing
Detailed SDK typing guide
WebSocket Presence
WebSocket presence protocol
WebSocket Typing
WebSocket typing protocol