TIMGroupDeleteGroupAttributes

Introduction

Delete group attributes

Support all types of group types except Community Group.

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.

NULL for json_keys to delete all group attributes.

Group attributes support all group types except topics

TIMGroupInitGroupAttributes, TIMGroupSetGroupAttributes, TIMGroupDeleteGroupAttributes together share the limits of calling frequency 5 times per 10 seconds. Once exceeded, it returns 8511 error code and the limits loose to 5 times per second. Once exceeded again, it returns 10049 error code.

Parameter details

Parameter name Parameter type Required Description
params DeleteAttributeParams yes Param of deleting group attributes

Returned template

Promise<commonResult<string>>

{
    code: TIMResult | TIMErrCode;
    desc?: string | undefined;
    json_param?: string | undefined;
    json_params?: string | undefined; 
    user_data?: string | undefined;
}

Return value details

name type description
code TIMResultTIMErrCode Request result: Error codes. 0 means success.
desc string | undefined The description of the error. It will be empty if success.
json_param string | undefined Return value of calling API
json_params string | undefined Return value of calling API. Compatible field, which is returned in some cases.
user_data string | undefined ImSDK is responsible for transporting user-defined data without any processing

Code example

import TimRender from "im_electron_sdk/dist/renderer";
const timRenderInstance = new TimRender();
import { DeleteAttributeParams } from "im_electron_sdk/dist/interfaces";

let grouId = ''
let attributesKey = ''
let param: DeleteAttributeParams = {
    groupId: grouId, // required
    attributesKey: [attributesKey], // required
    data: ''// optional
}
const { code } = await timRenderInstance.TIMGroupDeleteGroupAttributes(param)
if (code == 0) {
    // success
}

results matching ""

    No results matching ""