From 6cf7b54e24b0328f69b9231b83f9d70b94c889c7 Mon Sep 17 00:00:00 2001 From: Brett <99468005+std-s@users.noreply.github.com> Date: Mon, 15 Sep 2025 11:16:02 +0800 Subject: [PATCH] Inviting users to join a group results in an error (#219) --- lib/src/manager/im_group_manager.dart | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/src/manager/im_group_manager.dart b/lib/src/manager/im_group_manager.dart index b8c6a14..7a3b2d8 100644 --- a/lib/src/manager/im_group_manager.dart +++ b/lib/src/manager/im_group_manager.dart @@ -18,22 +18,20 @@ class GroupManager { /// Invite users to a group, allowing them to join without approval. /// [groupID] Group ID /// [userIDList] List of user IDs - Future> inviteUserToGroup({ + Future inviteUserToGroup({ required String groupID, required List userIDList, String? reason, String? operationID, }) => - _channel - .invokeMethod( - 'inviteUserToGroup', - _buildParam({ - 'groupID': groupID, - 'userIDList': userIDList, - 'reason': reason, - "operationID": Utils.checkOperationID(operationID), - })) - .then((value) => Utils.toList(value, (map) => GroupInviteResult.fromJson(map))); + _channel.invokeMethod( + 'inviteUserToGroup', + _buildParam({ + 'groupID': groupID, + 'userIDList': userIDList, + 'reason': reason, + "operationID": Utils.checkOperationID(operationID), + })); /// Remove group members /// [groupID] Group ID