SDKsHarmonyOSEnterprise
Get unhandled friend application count
Query the number of pending friend applications created after a specific timestamp.
Query the count of unhandled friend requests since a specific point in time:
Code example
import sdk, {
GetFriendApplicationUnhandledCountReq,
GetFriendApplicationUnhandledCountResp,
} from '@openimsdk/imsdk';
const request: GetFriendApplicationUnhandledCountReq = {
time: lastViewedAt,
};
const response: GetFriendApplicationUnhandledCountResp =
await sdk.getFriendApplicationUnhandledCount(request);
showPendingFriendCount(response.unhandledCount);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
time | number | Yes | Unix timestamp in milliseconds as the starting filter point. Pass 0 to count all unhandled requests. |
Return value
Returns a Promise that resolves to a GetFriendApplicationUnhandledCountResp object:
| Property | Type | Description |
|---|---|---|
unhandledCount | number | Number of unhandled friend requests created after time. |
State changes after the call
This query does not modify application records or emit events. To view and process incoming requests, see Retrieve received friend applications.
Was this page helpful?