Browse SDKs · WASM
SDKsWASM

Get subscribed user status

Refresh the online status of users to whom the current account is already subscribed.

Copy
const { data: states } = await openimsdk.getSubscribeUsersStatus();

After the Promise succeeds, data contains a UserOnlineState[] snapshot for subscribed users. See Subscribe to online status for field descriptions.

This query does not trigger a status event. If the target user has not been subscribed to, call subscribeUsersStatus() first.