TIMGroupHandlePendency

Introduction

Handle group pendency

You can grant or reject the pendency. Handled pendency cannot be handled twice.

You may store the pendency info from the callback data of TIMGroupGetPendencyList.

Parameter details

Parameter name Parameter type Required Description
handlePendencyParams HandlePendencyParams yes Param of handling group pendency

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 { HandlePendencyParams, GroupPendency } from "im_electron_sdk/dist/interfaces";

let groupId = ''

let groupPendency: GroupPendency = {
    group_pendency_group_id: groupId,// required
    group_pendency_add_time: 0,// required
    group_pendency_apply_invite_msg: "",// required
    group_pendency_approval_msg: "",// required
    group_pendency_authentication: "",// required
    group_pendency_form_identifier: "",// required
    group_pendency_form_user_defined_data: "",// required
    group_pendency_handle_result: 0,// required
    group_pendency_handled: 0,// required
    group_pendency_key: "",// required
    group_pendency_pendency_type: 0,// required
    group_pendency_self_identifier: "",// required
    group_pendency_to_identifier: "",// required
    group_pendency_to_user_defined_data: ""// required
}

let param: HandlePendencyParams = {
    params: {
        group_handle_pendency_param_is_accept: false,   // optional
        group_handle_pendency_param_handle_msg: '',     // optional
        group_handle_pendency_param_pendency: groupPendency    // required
    },
    data: 'test data'
}
const { code } = await timRenderInstance.TIMGroupHandlePendency(param)
if (code == 0) {
    // success
}

results matching ""

    No results matching ""