core, ui: chat relay test (#6736)

This commit is contained in:
spaced4ndy authored and GitHub committed 2026-04-02 15:36:36 +00:00
1 parent 42fe94752c
commit a14a66db14
40 files changed
+1670 -148

No files matched your search

+9
View File
@@ -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 }