From c376c1ac08eb81b66466cbba3b487dcb85421ce6 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 6 May 2020 00:56:44 +0300 Subject: [PATCH] Add comments about disallowed animated stickers. GitOrigin-RevId: 52115deae5121cb29b332a6d9782cdd4506d8ce0 --- td/telegram/DocumentsManager.cpp | 6 ++++++ td/telegram/StickersManager.cpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/td/telegram/DocumentsManager.cpp b/td/telegram/DocumentsManager.cpp index f181043c..21becb10 100644 --- a/td/telegram/DocumentsManager.cpp +++ b/td/telegram/DocumentsManager.cpp @@ -284,6 +284,9 @@ Document DocumentsManager::on_get_document(RemoteDocument remote_document, Dialo return {}; } + // do not allow encrypted animated stickers + // fix_animated_sticker_type(); + if (document_type != Document::Type::VoiceNote) { thumbnail = get_secret_thumbnail_photo_size(td_->file_manager_.get(), std::move(document->thumb_), owner_dialog_id, document->thumb_w_, document->thumb_h_); @@ -331,6 +334,9 @@ Document DocumentsManager::on_get_document(RemoteDocument remote_document, Dialo default: UNREACHABLE(); } + + // do not allow web animated stickers + // fix_animated_sticker_type(); } LOG(DEBUG) << "Receive document with id = " << id << " of type " << document_type; diff --git a/td/telegram/StickersManager.cpp b/td/telegram/StickersManager.cpp index 728624ea..40f7dd07 100644 --- a/td/telegram/StickersManager.cpp +++ b/td/telegram/StickersManager.cpp @@ -1849,7 +1849,7 @@ StickerSetId StickersManager::on_get_input_sticker_set(FileId sticker_file_id, case telegram_api::inputStickerSetShortName::ID: { auto set = move_tl_object_as(set_ptr); 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()); } auto set_id = search_sticker_set(set->short_name_, load_data_multipromise_ptr->get_promise());