AI Integration Quick Reference
AI Integration Quick Reference
Real-time Presence
Configure presence subscription inAppSettings during SDK initialization. The AppSettingsBuilder provides three subscription options:
If none of these methods are called, no presence events will be delivered.
You must configure presence subscription in
AppSettings during CometChat.init() before any presence events will be delivered. See Setup SDK for details.UserListener to receive presence events:
- TypeScript
- JavaScript
Each callback receives a
User object with presence information.
Relevant fields to access on returned users:
Presence events are triggered for other users, not for yourself. For example, if User 1 is logged in and User 2 comes online, User 1 receives
onUserOnline for User 2. Neither User 1 nor User 2 receive presence events for their own status changes — only for others.- TypeScript
- JavaScript
User List Presence
When fetching users viaUsersRequest, each User object includes presence fields:
Next Steps
Retrieve Users
Fetch user lists with filtering and pagination.
User Management
Create and update users programmatically.
Block Users
Block and unblock users to control communication.
SDK Setup
Configure AppSettings including presence subscriptions.