addFriendsToFriendGroup
Introduction
Add friends to a group.
Parameter details
Parameter name |
Parameter type |
Required |
Platform |
Description |
groupName |
String |
yes |
All |
The name of the group. |
userIDList |
List< String > |
yes |
All |
The list of user IDs needs to be added to the group. |
Returned template
V2TimValueCallback<List<V2TimFriendOperationResult>>
{
code : int
desc : String
data : List<V2TimFriendOperationResult>
}
Return value details
name |
type |
description |
code |
int |
Request result: Error codes. 0 means success. |
desc |
String |
The description of the error. It will be empty if success. |
data |
List< V2TimFriendOperationResult > |
The list of operation result. |
Code example
V2TimValueCallback<List<V2TimFriendOperationResult>>
addFriendsToFriendGroupRes = await TencentImSDKPlugin.v2TIMManager
.getFriendshipManager()
.addFriendsToFriendGroup(
groupName: "",
userIDList: []
);
if (addFriendsToFriendGroupRes.code == 0) {
addFriendsToFriendGroupRes.data?.forEach((element) {
element.resultCode;
element.resultInfo;
element.userID;
});
}