This commit is contained in:
spaced4ndy
2024-06-25 17:32:11 +04:00
parent c2eb510b4a
commit c9c47bd1a6
5 changed files with 418 additions and 63 deletions
+7
View File
@@ -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