Add fake sticker attribute to broken effects.

This commit is contained in:
levlam 2024-05-27 12:57:48 +03:00
parent bb642b74b6
commit 4079658376

View File

@ -3049,10 +3049,15 @@ std::pair<int64, FileId> StickersManager::on_get_sticker_document(tl_object_ptr<
}
}
if (sticker == nullptr && custom_emoji == nullptr) {
if (document->mime_type_ != "application/x-bad-tgsticker") {
LOG(ERROR) << "Have no attributeSticker in sticker " << to_string(document);
if (document->id_ == 5310062947890890996 || document->id_ == 5229108402113745134) {
sticker = telegram_api::make_object<telegram_api::documentAttributeSticker>(
0, false /*ignored*/, string(), telegram_api::make_object<telegram_api::inputStickerSetEmpty>(), nullptr);
} else {
if (document->mime_type_ != "application/x-bad-tgsticker") {
LOG(ERROR) << "Have no attributeSticker in sticker " << to_string(document);
}
return {};
}
return {};
}
auto format = get_sticker_format_by_mime_type(document->mime_type_);