浏览 SDKs · HarmonyOS
平台
SDKsHarmonyOS商业版

获取未处理入群申请数

查询指定时间点之后需要当前账号处理的入群申请数量。

复制

该数量适合用于展示群管理待办事项,不等同于获取入群申请角标数返回的未读入口角标。

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

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

time 是统计起点的 Unix 毫秒时间戳;传 0 表示统计全部未处理申请。查询本身不会修改申请状态,若需清零提示角标请参考清除入群申请角标。