mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-22 19:42:13 +00:00
core, ui: chat relay test (#6736)
This commit is contained in:
1 parent
42fe94752c
commit
a14a66db14
40 files changed
+1670
-148
No files matched your search
@@ -758,6 +758,15 @@ func testProtoServer(server: String) async throws -> Result<(), ProtocolTestFail
|
||||
throw r.unexpected
|
||||
}
|
||||
|
||||
func testChatRelay(address: String) async throws -> (RelayProfile?, RelayTestFailure?) {
|
||||
let userId = try currentUserId("testChatRelay")
|
||||
let r: ChatResponse0 = try await chatSendCmd(.apiTestChatRelay(userId: userId, address: address))
|
||||
if case let .chatRelayTestResult(_, relayProfile, relayTestFailure) = r {
|
||||
return (relayProfile, relayTestFailure)
|
||||
}
|
||||
throw r.unexpected
|
||||
}
|
||||
|
||||
func getServerOperators() async throws -> ServerOperatorConditions {
|
||||
let r: ChatResponse0 = try await chatSendCmd(.apiGetServerOperators)
|
||||
if case let .serverOperatorConditions(conditions) = r { return conditions }
|
||||
|
||||
Reference in new issue
Block a user