diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 1d67d1c8a..7929eb890 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -10557,7 +10557,8 @@ std::pair> MessagesManager::creat MESSAGE_FLAG_HAS_UNREAD_CONTENT | MESSAGE_FLAG_HAS_REPLY_MARKUP | MESSAGE_FLAG_HAS_ENTITIES | MESSAGE_FLAG_HAS_FROM_ID | MESSAGE_FLAG_HAS_MEDIA | MESSAGE_FLAG_HAS_VIEWS | MESSAGE_FLAG_IS_SENT_VIA_BOT | MESSAGE_FLAG_IS_SILENT | MESSAGE_FLAG_IS_POST | MESSAGE_FLAG_HAS_EDIT_DATE | MESSAGE_FLAG_HAS_AUTHOR_SIGNATURE | - MESSAGE_FLAG_HAS_MEDIA_ALBUM_ID | MESSAGE_FLAG_IS_LEGACY)) { + MESSAGE_FLAG_HAS_MEDIA_ALBUM_ID | MESSAGE_FLAG_IS_FROM_SCHEDULED | MESSAGE_FLAG_IS_LEGACY | + MESSAGE_FLAG_HIDE_EDIT_DATE | MESSAGE_FLAG_IS_RESTRICTED)) { LOG(ERROR) << "Unsupported message flags = " << flags << " received"; } @@ -10565,6 +10566,7 @@ std::pair> MessagesManager::creat bool is_silent = (flags & MESSAGE_FLAG_IS_SILENT) != 0; bool is_channel_post = (flags & MESSAGE_FLAG_IS_POST) != 0; bool is_legacy = (flags & MESSAGE_FLAG_IS_LEGACY) != 0; + bool hide_edit_date = (flags & MESSAGE_FLAG_HIDE_EDIT_DATE) != 0; LOG_IF(ERROR, is_channel_message && dialog_type != DialogType::Channel) << "is_channel_message is true for message received in the " << dialog_id; @@ -10662,6 +10664,7 @@ std::pair> MessagesManager::creat (dialog_type == DialogType::Chat || (dialog_type == DialogType::Channel && !is_broadcast_channel(dialog_id))); message->disable_notification = is_silent; message->is_content_secret = is_content_secret; + message->hide_edit_date = hide_edit_date; message->views = views; message->legacy_layer = (is_legacy ? MTPROTO_LAYER : 0); message->content = std::move(message_info.content); diff --git a/td/telegram/MessagesManager.h b/td/telegram/MessagesManager.h index d7a7a69de..63b87f9f1 100644 --- a/td/telegram/MessagesManager.h +++ b/td/telegram/MessagesManager.h @@ -144,7 +144,10 @@ class MessagesManager : public Actor { static constexpr int32 MESSAGE_FLAG_HAS_EDIT_DATE = 1 << 15; static constexpr int32 MESSAGE_FLAG_HAS_AUTHOR_SIGNATURE = 1 << 16; static constexpr int32 MESSAGE_FLAG_HAS_MEDIA_ALBUM_ID = 1 << 17; + static constexpr int32 MESSAGE_FLAG_IS_FROM_SCHEDULED = 1 << 18; static constexpr int32 MESSAGE_FLAG_IS_LEGACY = 1 << 19; + static constexpr int32 MESSAGE_FLAG_HIDE_EDIT_DATE = 1 << 21; + static constexpr int32 MESSAGE_FLAG_IS_RESTRICTED = 1 << 22; static constexpr int32 SEND_MESSAGE_FLAG_IS_REPLY = 1 << 0; static constexpr int32 SEND_MESSAGE_FLAG_DISABLE_WEB_PAGE_PREVIEW = 1 << 1; @@ -876,7 +879,7 @@ class MessagesManager : public Actor { } }; - // Do not forget to update MessagesManager::update_message when this class is changed + // Do not forget to update MessagesManager::update_message and all make_unique when this class is changed struct Message { int32 random_y;