mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-26 16:14:39 +00:00
wip
This commit is contained in:
@@ -1334,6 +1334,13 @@ func apiGetVersion() throws -> CoreVersionInfo {
|
||||
throw r
|
||||
}
|
||||
|
||||
func getAgentServersSummary() throws -> PresentedServersSummary {
|
||||
let userId = try currentUserId("getAgentServersSummary")
|
||||
let r = chatSendCmdSync(.getAgentServersSummary(userId: userId))
|
||||
if case let .agentServersSummary(_, serversSummary) = r { return serversSummary }
|
||||
throw r
|
||||
}
|
||||
|
||||
private func currentUserId(_ funcName: String) throws -> Int64 {
|
||||
if let userId = ChatModel.shared.currentUser?.userId {
|
||||
return userId
|
||||
|
||||
Reference in New Issue
Block a user