getSignalingInfo
Introduction
Get the information about the signaling message.
A new custom message will be sent for each signaling events, including invite/cancel/accept/reject/timeout, if the onlineUserOnly
is set to false. While the onRecvNewMessage
on each users will be triggered for this custom message, and users can load this message manually.
The detailed information related to a signaling, can be queried by this method, and the returns of null, represent the ID provided is not related to a signaling.
Parameter details
Parameter name | Parameter type | Required | Description |
---|---|---|---|
msgID | string | yes | 信令消息的id |
Returned template
V2TimValueCallback<V2TimSignalingInfo>
{
code : number
desc : string
data : {
inviteID : string
inviter : string // The list of invitees.
inviteeList : []//The list of invitees.
groupID : string//The group ID related to the invitation.
data : string//The custom data of the invitation.
timeout : number//The timeout configuration of the invitation.
actionType : number//The action type of the invitation.
businessID : number // Not works on iOS devices.
isOnlineUserOnly : boolean //Whether the message can be received by online users only. Not works on iOS devices.
offlinePushInfo : V2TimOfflinePushInfo //Offline push information. The title, body and external content carried and shown when a message is pushed offline. Not works on iOS devices.
}
}
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. |
data | V2TimSignalingInfo | The query result. |
Code example
import { TencentImSDKPlugin } from 'react-native-tim-js';
const getSignalingInfoRes = await TencentImSDKPlugin.v2TIMManager
.getSignalingManager()
.getSignalingInfo('msgID');
if (getSignalingInfoRes.code === 0) {
getSignalingInfoRes.data?.actionType;
getSignalingInfoRes.data?.businessID;
getSignalingInfoRes.data?.data;
getSignalingInfoRes.data?.groupID;
getSignalingInfoRes.data?.inviteID;
getSignalingInfoRes.data?.inviteeList;
getSignalingInfoRes.data?.inviter;
getSignalingInfoRes.data?.isOnlineUserOnly;
getSignalingInfoRes.data?.offlinePushInfo;
getSignalingInfoRes.data?.timeout;
}