no message

This commit is contained in:
Ilya Laktyushin
2018-09-07 22:36:29 +03:00
parent 2e5d6896a0
commit e35508a06c
44 changed files with 1132 additions and 256 deletions

View File

@@ -19,15 +19,15 @@ func saveToCameraRoll(applicationContext: TelegramApplicationContext, postbox: P
isImage = false
}
} else if let webpage = mediaReference.media as? TelegramMediaWebpage, case let .Loaded(content) = webpage.content {
if let image = content.image {
if let representation = largestImageRepresentation(image.representations) {
resource = representation.resource
}
} else if let file = content.file {
if let file = content.file {
resource = file.resource
if file.isVideo {
isImage = false
}
} else if let image = content.image {
if let representation = largestImageRepresentation(image.representations) {
resource = representation.resource
}
}
}