Disabled sending images with bad size from remoteContent for albums.

This commit is contained in:
23rd 2019-04-09 23:30:50 +03:00 committed by John Preston
parent 3767483977
commit c6eccc655f

View File

@ -497,8 +497,9 @@ void EditCaptionBox::createEditMediaButton() {
"image/png",
"video/mp4",
};
if ((ranges::find(albumMimes, list.files.front().mime)
== end(albumMimes))) {
const auto file = &list.files.front();
if (ranges::find(albumMimes, file->mime) == end(albumMimes)
|| file->type == Storage::PreparedFile::AlbumType::None) {
Ui::show(
Box<InformBox>(lang(lng_edit_media_album_error)),
LayerOption::KeepOther);