Browse SDKs · React Native
Platform
SDKsReact Native

Relationships overview

Understand friend relations, friend requests, and blacklists in the OpenIM React Native SDK.

Copy

Relationship capabilities manage social connections between the current user and other accounts—encompassing friendships, incoming and outgoing friend requests, and blacklists. User profiles, presence, and account settings are covered separately in User overview.

Relationship data structures

The SDK provides specialized models corresponding to each social state:

StructureContextApplicable guides
PublicUserItemSearch public profiles, display friend candidates, or render stranger cardsGet user profiles
FriendUserItemFriend list, friend remark aliases, pin status, and relationship extensionsGet friend list by page, Get specified friends info
FriendshipInfoCheck whether a friendship exists between usersCheck friend relationship
FriendApplicationItemReceived or sent friend requests and their processing statusesGet received friend applications, Get sent friend applications
BlackUserItemBlacklisted users maintained by the current accountGet blacklist, Add user to blacklist, Remove user from blacklist

Browse by task

Event listeners

Relationship mutations trigger asynchronous events: