acceptGroupApplication

Introduction

Accept a group entry application.

Parameter details

Parameter name Parameter type Required Description
groupID string yes The group ID.
reason string no The reason for the accepting.
reason string no The User ID of the applicant.
toUser string yes The User ID of the examiner.
addTime number no The application time.
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 acceptGroupApplicationRes =
                    await TencentImSDKPlugin.v2TIMManager
                        .getGroupManager()
                        .acceptGroupApplication(
                            element.groupID,
                            element.fromUser!,
                            element.toUser!,
                            'reason',
                            element.addTime,
                            element.type
                        );
                if (acceptGroupApplicationRes.code === 0) {

                }
            }
        }
    );
}

results matching ""

    No results matching ""