setGroupAttributes

Introduction

Set the group attributes.

It will add a new attribute, if the setting attribute not exists.

Works for AVChatRoom only temporarily.

The upper limit amount for attributes is 16, with the limit of 32 bytes for each attribute keys, and 4k for each values.

The total limit for attributes, including keys and values, is 16K.

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 The attributes to set.

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 setGroupAttributesRes = await TencentImSDKPlugin.v2TIMManager
        .getGroupManager()
        .setGroupAttributes(
          groupID: "groupID",
          attributes: {"custom":"custom"}
          );
    if (setGroupAttributesRes.code == 0) {
    }

results matching ""

    No results matching ""