getGroupAttributes

Introduction

Load the specific attributes for the group.

It will returns all of the attributes for the group, if the key is not specified.

Only works with AVChatRoom temporarily.

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 Description
groupID string yes The target group ID.
keys string[] yes The list of keys of the attributes.

Returned template

V2TimValueCallback<StringMap>

{
    code : number
    desc : string
    data : StringMap// The group attributes.
}

Return value details

name type description
code number Request result: Error codes. 0 means success.
desc string The description of the error. It will be empty if success.
data StringMap The map of the attributes obtained.

Code example



import { TencentImSDKPlugin } from 'react-native-tim-js';


const getGroupAttributesRes = await TencentImSDKPlugin.v2TIMManager
    .getGroupManager()
    .getGroupAttributes(
        'groupID',
        ['custom']
    );
if (getGroupAttributesRes.code === 0) {

    getGroupAttributesRes.data;
}

results matching ""

    No results matching ""