Wire iOS media downloads through session bridge

This commit is contained in:
Mikhail Kilin
2026-05-21 00:29:47 +03:00
parent 4fd2a18ed9
commit 892582df67
8 changed files with 50 additions and 2 deletions

View File

@@ -100,6 +100,11 @@ struct TeleTuiIOSSmokeTests {
await viewModel.copyPayload(for: viewModel.messages[0])
precondition(viewModel.copiedPayload == "Edited text")
let photo = try await bridge.downloadPhoto(fileId: 100)
let voice = try await bridge.downloadVoice(fileId: 200)
precondition(photo.path == "/tmp/fake-photo-100.jpg")
precondition(voice.path == "/tmp/fake-voice-200.ogg")
await viewModel.forward(message: viewModel.messages[0], to: 2)
let forwarded = try await bridge.loadHistory(chatId: 2)
precondition(forwarded.contains { $0.forwardSenderName == "Alice" && $0.text == "Edited text" })