cancel

Introduction

Cancel the invitation from inviter.

Parameter details

Parameter name Parameter type Required Description
inviteID string yes The ID of the invitation to be cancelled.
data string no The custom data carried by the canceling event.

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 listener = {
    onInvitationCancelled: (inviteID, inviter, data) => {
    },
    onInvitationTimeout: (inviteID, inviteeList) => {},
    onInviteeAccepted: (inviteID, invitee, data) => {},
    onInviteeRejected: (inviteID, invitee, data) => {},
    onReceiveNewInvitation: (
        inviteID,
        inviter,
        groupID,
        inviteeList,
        data
    ) => {},
};
TencentImSDKPlugin.v2TIMManager
    .getSignalingManager()
    .addSignalingListener(listener);
const cancelRes = await TencentImSDKPlugin.v2TIMManager
    .getSignalingManager()
    .cancel(
        'inviteID',
        ''
    );
if (cancelRes.code === 0) {

}

results matching ""

    No results matching ""