SDKsWASM
Check friendship status
Check the friendship between the current user and selected users.
const { data: checks } = await openimsdk.checkFriend(userIDs);After the Promise succeeds, data contains a CheckFriendResultItem[] 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 returns the friendship state at the time of the call and does not trigger friend events.
Was this page helpful?