TIMGroupDeleteMember

Introduction

Delete member from group

Permission description:

For Private group only group creator can delete members.

For Public/Meeting group, only group owner or admin can delete members

For AVChatRoom, use TIMGroupModifyMemberInfo to mute members, it can delete members.

Parameter details

Parameter name Parameter type Required Description
deleteMemberParams DeleteMemberParams yes Param of deleting member from group

Returned template

Promise<commonResult<DeleteMemberResult>>

{
    code: TIMResult | TIMErrCode;
    desc?: string | undefined;
    json_param?: DeleteMemberResult | undefined;
    json_params?: DeleteMemberResult | 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 DeleteMemberResult | undefined Return value of calling API
json_params DeleteMemberResult | 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 { DeleteMemberParams } from "im_electron_sdk/dist/interfaces";

let groupId = ''
let identifier = ''
let param: DeleteMemberParams = {
  params: {
    group_delete_member_param_group_id: groupId,  // required
    group_delete_member_param_identifier_array: [identifier],  // required
    group_delete_member_param_user_data: ''    // optional
  },
  data: 'test data'    // optional
}
const { code } = await timRenderInstance.TIMGroupDeleteMember(param)
if (code == 0) {
  // success
}

results matching ""

    No results matching ""