accept
Introduction
The recipient accepts the invitation.
Parameter details
Parameter name |
Parameter type |
Required |
Platform |
Description |
inviteID |
String |
yes |
All |
The ID of the invitation. |
data |
String |
yes |
All |
The custom data carried by the acceptance message. |
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 {
V2TimCallback acceptRes = await TencentImSDKPlugin.v2TIMManager
.getSignalingManager()
.accept(
inviteID: inviteID,
data: "");
if (acceptRes.code == 0) {
}
},
);
TencentImSDKPlugin.v2TIMManager
.getSignalingManager()
.addSignalingListener(listener: listener);