2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Fix animated stickers with wrong dimensions.

This commit is contained in:
John Preston
2020-07-17 08:13:45 +04:00
parent f64f1ea62e
commit 9463bbd266
5 changed files with 20 additions and 11 deletions

View File

@@ -842,8 +842,9 @@ void FileLoadTask::process() {
if (ValidateThumbDimensions(w, h)) {
isSticker = Core::IsMimeSticker(filemime)
&& GoodStickerDimensions(w, h)
&& (filesize < Storage::kMaxStickerBytesSize);
&& (filesize < Storage::kMaxStickerBytesSize)
&& (Core::IsMimeStickerAnimated(filemime)
|| GoodStickerDimensions(w, h));
if (isSticker) {
attributes.push_back(MTP_documentAttributeSticker(
MTP_flags(0),