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

Unsubscribe from user presence

Stop receiving presence changes for selected users.

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

await unsubscribeUsersStatus(['user_a', 'user_b'])

This removes only the selected server-side subscriptions. It does not remove other users or release the local onUserStatusChanged handler. Manage both lifecycles: call this API for unwanted users and off(subscription) when the local event owner ends. On failure, retain local bookkeeping and retry according to network state rather than looping rapidly.