Browse SDKs · WASM
SDKsWASM

Check friendship status

Check the friendship between the current user and selected users.

Copy
const { data: checks } = await openimsdk.checkFriend(userIDs);

After the Promise succeeds, data contains a FriendshipInfo[] corresponding to the input user IDs. In each item, userID identifies the checked user and result is 1 for a friend or 0 for a non-friend. Query the blacklist separately if the application must distinguish blacklisted users. This method establishes a snapshot and does not trigger friend events.