Skip to content
v1
文档/Android SDK/好友

好友申请与处理

接口

kotlin
suspend fun applyFriend(userId: String, intro: String?)
suspend fun acceptFriend(userId: String, reason: String?)
suspend fun rejectFriend(userId: String, reason: String?)
suspend fun ignoreFriend(userId: String, reason: String?)
kotlin
val service = BimImManager.getInstance().friendService
service.applyFriend("u10002", "我们在同一个项目组")
service.acceptFriend("u10003", null)
service.rejectFriend("u10004", "暂不方便添加")
service.ignoreFriend("u10005", null)

申请列表通过 fetchFriendApplyList() 获取,返回 BimFriendApply。成功或失败由 suspend 结果和 BimError 表达;兼容 callback 重载仍保留但已 deprecated。