initGroupAttributes

Introduction

Initialize the group attributes.

This method will clear all attributes in the group.

Only works with AVChatRoom temporarily.

The upper limit of the amount of keys is 16.

The limit of the length of each keys is up to 32 bytes, while for values is up to 4,000 bytes.

The total size of all attributes is 16 k.

initGroupAttributes, setGroupAttributes, deleteGroupAttributes methods calculate request rate merged: SDK limit rate at 5 seconds 10 times, and the 8511 error code is returned after over limit; The server limit rate at 5 times in a second, and 10049 error code is returned after exceeding the limit.

Parameter details

Parameter name Parameter type Required Platform Description
groupID String yes All The group ID.
attributes Map< String,String > yes All Initial attributes.

Returned template

V2TimCallback

{
    code : int
    desc : String
}

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.

Code example

    V2TimCallback initGroupAttributesRes = await TencentImSDKPlugin.v2TIMManager
        .getGroupManager()
        .initGroupAttributes(
          groupID: "groupID",
          attributes: {"custom":"custom"}
          );
    if (initGroupAttributesRes.code == 0) {
    }

results matching ""

    No results matching ""