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

Remove a user from the blacklist

Unblock a specified user by removing them from the authenticated account’s blacklist.

Copy

Invoke removeBlack() to unblock a user by removing them from the authenticated account's blacklist. This operation alters only the blacklist record; it does not automatically re-establish a friendship or restore other application-specific relationship states.

Parameters

ParameterTypeRequiredDescription
toUserIDstringYesThe user ID of the target user to unblock.

Code example

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

await removeBlack(toUserID)

Return value

The Promise resolves with void once OpenIMServer processes the removal.

State changes after the call

A resolved Promise confirms that the request completed successfully on OpenIMServer; it does not indicate that the onBlackDeleted event has arrived across all devices. Upon receiving the event, remove the record matching userID from your blacklist cache. For event listener setup, see Get the blacklist. To verify state immediately, re-query the blacklist via getBlackList().