Retrieve the latest information on participants
To retrieve the latest and updated information on each online participant in an open channel, you need to create a new query instance using the ParticipantListQuery
instance, then call the next()
method consecutively to retrieve the latest information.
You can also retrieve the latest information on participants at the application level. Similar to retrieving a list of users, you need to create a new query instance using
ApplicationUserListQuery
then call next()
until you retrieve the latest information.
You can get the participant's current connection status by checking the UserConnectionStatus
of each User
object in the returned list. Acceptable values of the UserConnectionStatus
property are offline
and online
.
Connection status values
Value | Description |
---|---|
UserConnectionStatus.offline | The user isn't connected to the Sendbird server. |
UserConnectionStatus.online | The user is connected to the Sendbird server. |
Note: If you need to keep track of the connection status of some users in real time, we recommend that you periodically call the
next()
method of aApplicationUserListQuery
instance after specifying itsuserIdsFilter
filter, perhaps in intervals of one minute or more.