getFriendApplicationList
Introduction
Load the list of friend applications.
Parameter details
This API has no parameters
Returned template
V2TimValueCallback<V2TimFriendApplicationResult>
{
code : number
desc : string
data : {
friendApplicationList : V2TimFriendApplication[]
unreadCount : number
}
}
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 | V2TimFriendApplicationResult | The list of applications. |
Code example
import { TencentImSDKPlugin } from 'react-native-tim-js';
const getFriendApplicationListRes = await TencentImSDKPlugin.v2TIMManager
.getFriendshipManager()
.getFriendApplicationList();
if (getFriendApplicationListRes.code === 0) {
getFriendApplicationListRes.data?.unReadCount;
getFriendApplicationListRes.data?.friendApplicationList?.forEach(
(element) => {
element?.addSource;
element?.addTime;
element?.addWording;
element?.faceUrl;
element?.nickName;
element?.type;
element?.userID;
}
);
}