How to use the @cometchat-pro/chat.CometChat.UsersRequestBuilder function in @cometchat-pro/chat

To help you get started, we’ve selected a few @cometchat-pro/chat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cometchat-pro-samples / javascript-reactjs-chat-app / src / js / components / embed / CCUserList.js View on Github external
fetchUserWithSearchKey(key){
    var current = this;
    let usersRequest = new CometChat.UsersRequestBuilder().setLimit(100).setSearchKeyWord(key).build();
    usersRequest.fetchNext().then(
      userList => {
        current.updateUserList(userList);
      },
      error => {
        console.log("User list fetching failed with error:", error);
      }
    );
  }
github cometchat-pro-samples / javascript-reactjs-chat-app / src / js / lib / cometchat / ccManager.js View on Github external
static setUserRequestBuilder(limit){
    CCManager.userRequest = new CometChat.UsersRequestBuilder().setLimit(limit).hideBlockedUsers(true).build();
  }