User

This section contains user Qiscus Chat SDK behavior. You can do update user profile with metadata, block user, unblock user, and get list of blocked user.

Update User Profile with Metadata

You can update user's data, for example:

Dart
Copy

Where:

  • name (string): username of its user, for display name purpose if in 1-on-1 chat room
  • avatarUrl (string): a URL to display user's avatar, fallback to default avatar if not provided
  • extras (object, optional): metadata that can be as additional information to user, which consist key-value, for example key: position, and value: engineer.

User Authentication Checking

You can check whether a user is authenticated or not, and make sure that the user is allowed to use Qiscus Chat SDK features. When the return is true, it means that user already authenticated, otherwise false means user is not authenticated yet.

Dart
Copy

Block User

You can block a user with related userId parameter. This block user feature only works for 1-on-1 Chat Room. When a user is in the same Group or Channel with the blocked user, a user still receives messages from blocked user.

For further information you can see this link. You can also use this function by calling this method, for example:

Dart
Copy

If you would like to enable block user feature, you can send your request to our team.

Unblock User

You can unblock a user with related userId parameter. Unblocked user can send a message again into particular Chat Room, for example:

Dart
Copy

If you would like to enable block user feature, you can send your request to our team.

Get Blocked User List

You can get blocked user list with pagination, with page parameter and you can set also the limit number of blocked users, for example:

Dart
Copy

If you would like to enable block user feature, you can send your request to our team.

Get List of All Users

You can get list of users within your App Id. You need to pass searchUsername,page, and limit. This searchUsername means the username that you are looking for. For example: "John". For the implementation you can refer this code below:

Dart
Copy

searchUsername is deprecated

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard