subscribeUsersInfo method

Future<void> subscribeUsersInfo(
  1. List<String> userIds
)

~english Subscribes to the user attributes of the specified users.

After the subscription succeeds, you can receive the ChatUserInfoEventHandler.onUserInfoUpdate callback when the user attributes of the subscribed users are updated.

Param userIds The list of user IDs to subscribe to.

Throws A description of the exception. See ChatError. ~end

~chinese 订阅指定用户的用户属性。

订阅成功后,当被订阅用户的用户属性更新时,会收到 ChatUserInfoEventHandler.onUserInfoUpdate 回调。

Param userIds 要订阅的用户 ID 列表。

Throws 如果有方法调用的异常会在这里抛出,可以看到具体错误原因。请参见 ChatError。 ~end

Implementation

Future<void> subscribeUsersInfo(List<String> userIds) async {
  try {
    Map req = {'userIds': userIds};
    Map result = await platform_interface.Client.instance.userInfoManager
        .callNativeMethod(ChatMethodKeys.subscribeUsersInfo, req);
    ChatError.hasErrorFromResult(result);
  } catch (e) {
    rethrow;
  }
}