createFriendGroup
Introduction
Create a new friend group。
Users can create friend groups in some cases, like separate to 'Work groups', 'Social groups', with this method.
Parameter details
Parameter name | Parameter type | Required | Platform | Description |
---|---|---|---|---|
groupName | String | yes | All | The name of the group. |
userIDList | List< String > | no | All | The list of user IDs 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>> createFriendGroupRes =
await TencentImSDKPlugin.v2TIMManager
.getFriendshipManager()
.createFriendGroup(
userIDList: [],
groupName: "",
);
if (createFriendGroupRes.code == 0) {
createFriendGroupRes.data?.forEach((element) {
element.resultCode;
element.resultInfo;
element.userID;
});
}