mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 14:08:41 +00:00
Fix sending .tgs files as stickers.
Regression was introduced in 3467fe226f
.
This commit is contained in:
@@ -901,11 +901,11 @@ void FileLoadTask::process(Args &&args) {
|
|||||||
attributes.push_back(MTP_documentAttributeImageSize(MTP_int(w), MTP_int(h)));
|
attributes.push_back(MTP_documentAttributeImageSize(MTP_int(w), MTP_int(h)));
|
||||||
|
|
||||||
if (ValidateThumbDimensions(w, h)) {
|
if (ValidateThumbDimensions(w, h)) {
|
||||||
isSticker = (_type == SendMediaType::File)
|
isSticker = Core::IsMimeSticker(filemime)
|
||||||
&& Core::IsMimeSticker(filemime)
|
|
||||||
&& (filesize < Storage::kMaxStickerBytesSize)
|
&& (filesize < Storage::kMaxStickerBytesSize)
|
||||||
&& (Core::IsMimeStickerAnimated(filemime)
|
&& (Core::IsMimeStickerAnimated(filemime)
|
||||||
|| GoodStickerDimensions(w, h));
|
|| (_type == SendMediaType::File
|
||||||
|
&& GoodStickerDimensions(w, h)));
|
||||||
if (isSticker) {
|
if (isSticker) {
|
||||||
attributes.push_back(MTP_documentAttributeSticker(
|
attributes.push_back(MTP_documentAttributeSticker(
|
||||||
MTP_flags(0),
|
MTP_flags(0),
|
||||||
|
Reference in New Issue
Block a user