getC2CReceiveMessageOpt
Introduction
Query the message receiving options for other users.
Parameter details
Parameter name |
Parameter type |
Required |
Description |
userIDList |
string[] |
yes |
The user ID list for query. |
Returned template
V2TimValueCallback<V2TimReceiveMessageOptInfo[]>
{
code : number
desc : string
data : V2TimReceiveMessageOptInfo[]
}
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 |
V2TimReceiveMessageOptInfo[] |
The list of results. |
Code example
import { TencentImSDKPlugin } from 'react-native-tim-js';
const getC2CReceiveMessageOptRes = await TencentImSDKPlugin.v2TIMManager
.getMessageManager()
.getC2CReceiveMessageOpt(['user1', 'user2']);
if (getC2CReceiveMessageOptRes.code === 0) {
getC2CReceiveMessageOptRes.data?.forEach((element) => {
element.c2CReceiveMessageOpt;
element.userID;
});
}