AttachmentTransport: per-attachment транспортный сервер и тег, backward-compat Codable, download parity

This commit is contained in:
2026-03-29 21:08:02 +05:00
parent 44a74ad327
commit 8c64111bd6
13 changed files with 336 additions and 162 deletions

View File

@@ -160,12 +160,13 @@ private final class MockAttachmentFlowTransport: AttachmentFlowTransporting {
var tagsById: [String: String] = [:]
private(set) var uploadedIds: [String] = []
func uploadFile(id: String, content: Data) async throws -> String {
func uploadFile(id: String, content: Data) async throws -> (tag: String, server: String) {
uploadedIds.append(id)
return tagsById[id] ?? UUID().uuidString.lowercased()
let tag = tagsById[id] ?? UUID().uuidString.lowercased()
return (tag: tag, server: "https://mock-transport.test")
}
func downloadFile(tag: String) async throws -> Data {
func downloadFile(tag: String, server: String?) async throws -> Data {
Data()
}
}