SDKsReact Native
Check friendship status
Check friendships with the OpenIM React Native SDK.
Call checkFriend() to check the friendship between the current user and multiple target users.
const checks = await OpenIMSDK.checkFriend(['user_a', 'user_b']);The returned FriendshipInfo[] corresponds to the input IDs by userID:
| Field | Type | Description |
|---|---|---|
userID | string | ID of the user being checked. |
result | number | 1 means the users are friends; 0 means they are not. |
To determine a blocklist relationship, call Get the blocklist separately.
Was this page helpful?