Browse SDKs · uni-app / uni-app x
SDKsuni-app

Accept a friend request

Accept a friend request from a selected user.

Copy
import { acceptFriendApplication } from '@/uni_modules/unix-openim-sdk'

await acceptFriendApplication({ toUserID: 'user_b', handleMsg: 'Accepted' })

toUserID identifies the other party. Update the request and friend stores independently from events or fresh queries. Disable duplicate actions while the request is pending; repeated handling can return a state error.