Gets the current presence state of users.
connection.getPresenceStatus({usernames: ['user1','user2']})
The array of IDs of users whose current presence state you want to check.
Uses pagination to get a list of users whose presence states you have subscribed to.
connection.getSubscribedPresencelist({usernames: ['user1','user2']})
The current page number, starting from 1.
The number of subscribers per page.
Publishes a custom presence state.
connection.publishPresence({description: 'music'})
The extension description information of the presence state. It can be set as nil.
Subscribes to a user's presence states. If the subscription succeeds, the subscriber will receive the callback when the user's presence state changes.
connection.subscribePresence({usernames: ['user1','user2'], expiry: 10000})
The time of the presence subscription.
The array of IDs of users whose presence states you want to subscribe to.
Unsubscribes from a user's presence states.
connection.unsubscribePresence({usernames: ['user1','user2']})
The array of IDs of users whose presence states you want to unsubscribe from.
Generated using TypeDoc
Presence contains APIs for presence operations.