cancel
Introduction
Cancel the invitation from inviter.
Parameter details
Parameter name |
Parameter type |
Required |
Platform |
Description |
inviteID |
String |
yes |
All |
The ID of the invitation to be cancelled. |
data |
String |
yes |
All |
The custom data carried by the canceling event. |
Returned template
V2TimCallback
{
code : int
desc : String
}
Return value details
name |
type |
description |
code |
int |
Request result: Error codes. 0 means success. |
desc |
String |
The description of the error. It will be empty if success. |
Code example
V2TimSignalingListener listener = V2TimSignalingListener(
onInvitationCancelled:
(String inviteID, String inviter, String data) async {
},
onInvitationTimeout: (String inviteID, List<String> inviteeList) async {},
onInviteeAccepted:
(String inviteID, String invitee, String data) async {},
onInviteeRejected:
(String inviteID, String invitee, String data) async {},
onReceiveNewInvitation: (String inviteID, String inviter, String groupID,
List<String> inviteeList, String data) async {},
);
TencentImSDKPlugin.v2TIMManager
.getSignalingManager()
.addSignalingListener(listener: listener);
V2TimCallback cancelRes = await TencentImSDKPlugin.v2TIMManager
.getSignalingManager()
.cancel(
inviteID: "inviteID",
data: "");
if (cancelRes.code == 0) {
}