Browse SDKs · uni-app / uni-app x
SDKsuni-app

Get subscribed user presence

Read a snapshot for users whose status is already subscribed.

Copy

getSubscribeUsersStatus() takes no user IDs and returns the current subscribed-user snapshot.

import { getSubscribeUsersStatus } from '@/uni_modules/unix-openim-sdk'

const result = await getSubscribeUsersStatus()
result?.statuses.forEach((status) => replaceUserStatus(status.userID, status))

An empty list can mean no subscriptions or no available presence; it does not diagnose connectivity. Continue merging onUserStatusChanged, and reload this snapshot after foreground restoration or store reconstruction.