SDKsReact Native
Add a user to the blacklist
Block a user with the OpenIM React Native SDK.
Call addBlack() to add a specified user to the current account's blocklist.
await OpenIMSDK.addBlack({
toUserID,
ex,
});Parameter description
| Parameter | Type | Required | Description |
|---|---|---|---|
toUserID | string | Yes | User ID to block. |
ex | string | No | Blocklist relationship extension information. |
After the user is blocked, OnBlackAdded is emitted. See Get the blocklist for the blocklist and listener example.
Was this page helpful?