- RevueSDK
- FriendManager
Class
FriendManager
好友管理器
final class FriendManagerOverview
封裝 RevueKit Core 的好友管理功能,提供好友新增、刪除、訊息收發等操作。
Topics
Instance Methods
func acceptInvitation(friendId: String) throws接受對方邀請
func addFriend(address: String, message: String) throws加好友。對方已在好友列表時 throws .alreadyExists
func addFriendNorequest(friendId: String) throws接受好友請求(不發送請求)。對方已在好友列表時 throws .alreadyExists
func cancelInvitation(friendId: String) throws撥打方取消尚未接通的邀請
func deleteFriend(friendId: String) throws刪除好友。好友不存在時 throws .notFound
func getFriendList() -> [String]func getFriendName(friendId: String) -> Stringfunc getFriendPaths(friendId: String) -> FriendConnectionPaths取得好友連線路徑(v0.13.0-rc1)
func getFriendPresenceStatus(friendId: String) -> PresenceStatus取得好友的 MQTT presence 狀態,與 tox 連線路徑(
getFriendPaths)互相獨立。func getFriendStatusMessage(friendId: String) -> Stringfunc isFriendExists(friendId: String) -> Bool檢查好友是否存在
func rejectInvitation(friendId: String) throws拒絕對方邀請
func sendInvitation(friendId: String, message: String?) throws送出通話邀請給朋友
func sendMessage(friendId: String, message: String, timeout: TimeInterval) async throws -> UInt32發送文字訊息給好友並等待送達確認。