diff --git a/td/telegram/FileReferenceManager.h b/td/telegram/FileReferenceManager.h index c1f5b7113..2b48c572a 100644 --- a/td/telegram/FileReferenceManager.h +++ b/td/telegram/FileReferenceManager.h @@ -9,6 +9,7 @@ #include "td/telegram/BackgroundId.h" #include "td/telegram/ChannelId.h" #include "td/telegram/ChatId.h" +#include "td/telegram/DialogId.h" #include "td/telegram/files/FileId.h" #include "td/telegram/files/FileSourceId.h" #include "td/telegram/MessageFullId.h" diff --git a/td/telegram/MessageContent.cpp b/td/telegram/MessageContent.cpp index e169c544f..cf3f04e1a 100644 --- a/td/telegram/MessageContent.cpp +++ b/td/telegram/MessageContent.cpp @@ -8041,7 +8041,7 @@ FileId get_message_content_thumbnail_file_id(const MessageContent *content, cons vector get_message_content_thumbnail_file_ids(const MessageContent *content, const Td *td) { if (content->get_type() == MessageContentType::PaidMedia) { return transform(static_cast(content)->media, - [td](const MessageExtendedMedia &media) { return media.get_thumbnail_file_id(td); }); + [&](const MessageExtendedMedia &media) { return media.get_thumbnail_file_id(td); }); } auto file_id = get_message_content_thumbnail_file_id(content, td); if (file_id.is_valid()) { diff --git a/td/telegram/MessageExtendedMedia.cpp b/td/telegram/MessageExtendedMedia.cpp index 3e259091d..561c78d4c 100644 --- a/td/telegram/MessageExtendedMedia.cpp +++ b/td/telegram/MessageExtendedMedia.cpp @@ -11,8 +11,7 @@ #include "td/telegram/Document.h" #include "td/telegram/DocumentsManager.h" #include "td/telegram/files/FileManager.h" -#include "td/telegram/MessageContent.h" -#include "td/telegram/MessageContentType.h" +#include "td/telegram/files/FileType.h" #include "td/telegram/Photo.h" #include "td/telegram/PhotoSize.h" #include "td/telegram/StickersManager.h" @@ -401,7 +400,7 @@ void MessageExtendedMedia::merge_files(Td *td, MessageExtendedMedia &other, Dial return; } if (type_ != other.type_) { - LOG(ERROR) << "Type of a paid media has changed"; + LOG(ERROR) << "Type of paid media has changed"; return; } switch (type_) { diff --git a/td/telegram/StarManager.cpp b/td/telegram/StarManager.cpp index a296aa03b..098028ec5 100644 --- a/td/telegram/StarManager.cpp +++ b/td/telegram/StarManager.cpp @@ -12,13 +12,16 @@ #include "td/telegram/DialogId.h" #include "td/telegram/DialogManager.h" #include "td/telegram/FileReferenceManager.h" +#include "td/telegram/files/FileId.h" #include "td/telegram/files/FileManager.h" #include "td/telegram/Global.h" #include "td/telegram/InputInvoice.h" #include "td/telegram/MessageExtendedMedia.h" +#include "td/telegram/MessageId.h" #include "td/telegram/MessageSender.h" #include "td/telegram/PasswordManager.h" #include "td/telegram/Photo.h" +#include "td/telegram/ServerMessageId.h" #include "td/telegram/StatisticsManager.h" #include "td/telegram/Td.h" #include "td/telegram/telegram_api.h" diff --git a/td/telegram/StarManager.h b/td/telegram/StarManager.h index b15ddb978..32420e221 100644 --- a/td/telegram/StarManager.h +++ b/td/telegram/StarManager.h @@ -15,6 +15,7 @@ #include "td/actor/actor.h" #include "td/utils/common.h" +#include "td/utils/FlatHashMap.h" #include "td/utils/Promise.h" #include "td/utils/Status.h" diff --git a/td/telegram/files/FileManager.cpp b/td/telegram/files/FileManager.cpp index 89dac2911..13a21e6bc 100644 --- a/td/telegram/files/FileManager.cpp +++ b/td/telegram/files/FileManager.cpp @@ -3631,7 +3631,7 @@ bool FileManager::extract_was_thumbnail_uploaded( return false; } switch (input_media->get_id()) { - case telegram_api::inputMediaDocument::ID: + case telegram_api::inputMediaUploadedDocument::ID: return static_cast(input_media.get())->thumb_ != nullptr; case telegram_api::inputMediaPaidMedia::ID: { auto &extended_media = static_cast(input_media.get())->extended_media_; diff --git a/td/telegram/net/NetQueryVerifier.cpp b/td/telegram/net/NetQueryVerifier.cpp index 79569c3f7..9aa8c6070 100644 --- a/td/telegram/net/NetQueryVerifier.cpp +++ b/td/telegram/net/NetQueryVerifier.cpp @@ -14,11 +14,15 @@ #include "td/utils/base64.h" #include "td/utils/common.h" +#include "td/utils/logging.h" +#include "td/utils/misc.h" #include "td/utils/Slice.h" #include "td/utils/Status.h" #include "td/utils/Storer.h" #include "td/utils/utf8.h" +#include + namespace td { void NetQueryVerifier::verify(NetQueryPtr query, string nonce) {