getLoggedInUser()
method. This method can also be used to check if the user is logged in or not. If the method returns Promise
with reject callback, it indicates that the user is not logged in and you need to log the user into CometChat SDK.
User
object containing all the information related to the logged-in user.
UsersRequest
class. To use this class i.e to create an object of the UsersRequest
class, you need to use the UsersRequestBuilder
class. The UsersRequestBuilder
class allows you to set the parameters based on which the users are to be fetched.
The UsersRequestBuilder
class allows you to set the below parameters:
setSearchKeyword()
. By default the keyword is searched in both UID & Name.
25
users can be fetched.
status => name => UID
. If name
is pass to the sortBy()
method the user list will be sorted by name => UID
.
getUser()
method.
getUser()
method takes the following parameters:
Parameter | Description |
---|---|
UID | The UID of the user for whom the details are to be fetched |
User
object containing the details of the user.
getOnlineUserCount()
method.