Browse SDKs · HarmonyOS
Platform
SDKsHarmonyOSEnterprise

Get unhandled group application count

Query the count of group join requests pending review by the current user after a specified timestamp.

Copy

This count is ideal for displaying pending group management action items and is distinct from the unread badge count returned by Get group application badge count.

Code example

import sdk, {
  GetGroupApplicationUnhandledCountReq,
  GetGroupApplicationUnhandledCountResp,
} from '@openimsdk/imsdk';

const request: GetGroupApplicationUnhandledCountReq = { time: 0 };
const response: GetGroupApplicationUnhandledCountResp =
  await sdk.getGroupApplicationUnhandledCount(request);
setPendingApplicationCount(response.unhandledCount);

Parameters

ParameterTypeRequiredDescription
timenumberYesUnix millisecond timestamp threshold. Pass 0 to count all unhandled applications.

Return value

Returns a Promise resolving to GetGroupApplicationUnhandledCountResp:

PropertyTypeDescription
unhandledCountnumberNumber of unhandled group applications pending review.

State changes after the call

This is a read-only query that does not modify application records or status. To clear the notification badge for group applications, see Clear group application badge count.