[WIP] Serialization

This commit is contained in:
Isaac
2025-02-13 22:32:59 +04:00
parent c178023779
commit 8918f70173
30 changed files with 1515 additions and 64 deletions

View File

@@ -2,7 +2,6 @@ import Foundation
import Postbox
import TelegramApi
func dimensionsForFileAttributes(_ attributes: [TelegramMediaFileAttribute]) -> PixelDimensions? {
for attribute in attributes {
switch attribute {
@@ -183,7 +182,7 @@ func telegramMediaFileFromApiDocument(_ document: Api.Document, altDocuments: [A
}
}
var alternativeRepresentations: [Media] = []
var alternativeRepresentations: [TelegramMediaFile] = []
if let altDocuments {
alternativeRepresentations = altDocuments.compactMap { telegramMediaFileFromApiDocument($0, altDocuments: []) }
}