refuseGroupApplication

Introduction

Refuse a group entry application.

Parameter details

Parameter name Parameter type Required Description
groupID string yes The current group ID.
reason string no The reason for the refuse.
fromUser string yes The ID of the applicant.
toUser string yes The ID of the of the operator.
addTime number no The time of making this application.
type GroupApplicationTypeEnum no The application type.

Returned template

V2TimCallback

{
    code : number
    desc : string
}

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.

Code example

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


const getGroupApplicationListRes = await TencentImSDKPlugin.v2TIMManager
    .getGroupManager()
    .getGroupApplicationList();
if (getGroupApplicationListRes.code === 0) {

    getGroupApplicationListRes.data?.groupApplicationList?.forEach(
        async (element) => {
            if (element != null) {
                const refuseGroupApplicationRes =
                    await TencentImSDKPlugin.v2TIMManager
                        .getGroupManager()
                        .refuseGroupApplication(
                            element.groupID,
                            element.fromUser!,
                            element.toUser!,
                            element.type,
                            element.addTime!,
                            'reason'
                        );
                if (refuseGroupApplicationRes.code === 0) {

                }
            }
        }
    );
}

results matching ""

    No results matching ""