Add comments about disallowed animated stickers.

GitOrigin-RevId: 52115deae5121cb29b332a6d9782cdd4506d8ce0
This commit is contained in:
levlam 2020-05-06 00:56:44 +03:00
parent 9ade35d9ba
commit c376c1ac08
2 changed files with 7 additions and 1 deletions

View File

@ -284,6 +284,9 @@ Document DocumentsManager::on_get_document(RemoteDocument remote_document, Dialo
return {}; return {};
} }
// do not allow encrypted animated stickers
// fix_animated_sticker_type();
if (document_type != Document::Type::VoiceNote) { if (document_type != Document::Type::VoiceNote) {
thumbnail = get_secret_thumbnail_photo_size(td_->file_manager_.get(), std::move(document->thumb_), thumbnail = get_secret_thumbnail_photo_size(td_->file_manager_.get(), std::move(document->thumb_),
owner_dialog_id, document->thumb_w_, document->thumb_h_); owner_dialog_id, document->thumb_w_, document->thumb_h_);
@ -331,6 +334,9 @@ Document DocumentsManager::on_get_document(RemoteDocument remote_document, Dialo
default: default:
UNREACHABLE(); UNREACHABLE();
} }
// do not allow web animated stickers
// fix_animated_sticker_type();
} }
LOG(DEBUG) << "Receive document with id = " << id << " of type " << document_type; LOG(DEBUG) << "Receive document with id = " << id << " of type " << document_type;

View File

@ -1849,7 +1849,7 @@ StickerSetId StickersManager::on_get_input_sticker_set(FileId sticker_file_id,
case telegram_api::inputStickerSetShortName::ID: { case telegram_api::inputStickerSetShortName::ID: {
auto set = move_tl_object_as<telegram_api::inputStickerSetShortName>(set_ptr); auto set = move_tl_object_as<telegram_api::inputStickerSetShortName>(set_ptr);
if (load_data_multipromise_ptr == nullptr) { if (load_data_multipromise_ptr == nullptr) {
LOG(ERROR) << "Receive sticker set by its short name"; LOG(ERROR) << "Receive sticker set " << set->short_name_ << " by its short name";
return search_sticker_set(set->short_name_, Auto()); return search_sticker_set(set->short_name_, Auto());
} }
auto set_id = search_sticker_set(set->short_name_, load_data_multipromise_ptr->get_promise()); auto set_id = search_sticker_set(set->short_name_, load_data_multipromise_ptr->get_promise());