diff options
| -rw-r--r-- | td/generate/scheme/td_api.tl | 10 | ||||
| -rw-r--r-- | td/telegram/BusinessConnectionManager.cpp | 9 | ||||
| -rw-r--r-- | td/telegram/CommunityManager.cpp | 2 | ||||
| -rw-r--r-- | td/telegram/CommunityManager.h | 2 | ||||
| -rw-r--r-- | td/telegram/DraftMessageManager.cpp | 2 | ||||
| -rw-r--r-- | td/telegram/DraftMessageManager.h | 2 | ||||
| -rw-r--r-- | td/telegram/MessageQueryManager.cpp | 4 | ||||
| -rw-r--r-- | td/telegram/MessageQueryManager.h | 5 | ||||
| -rw-r--r-- | td/telegram/MessageReplyHeader.cpp | 2 | ||||
| -rw-r--r-- | td/telegram/MessageTopic.hpp | 2 | ||||
| -rw-r--r-- | td/telegram/MessagesManager.cpp | 1 |
11 files changed, 25 insertions, 16 deletions
diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index afc828046..0b894ed9b 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -674,7 +674,7 @@ game id:int64 short_name:string title:string text:formattedText description:stri //@description Describes state of the stake dice //@state_hash Hash of the state to use for sending the next dice; may be empty if the stake dice can't be sent by the current user -//@stake_gram_amount The amount of TON Grams that was staked in the previous roll; in the smallest units of the currency +//@stake_gram_amount The amount of TON Grams staked in the previous roll; in the smallest units of the currency //@suggested_stake_gram_amounts The amounts of Grams that are suggested to be staked; in the smallest units of the currency //@current_streak The number of rolled sixes towards the streak; 0-2 //@prize_per_mille The number of Grams received by the user for each 1000 Grams staked if the dice outcome is 1-6 correspondingly; may be empty if the stake dice can't be sent by the current user @@ -3080,7 +3080,7 @@ inputMessageReplyToExternalMessage chat_id:int53 message_id:int53 quote:inputTex //@story_id The identifier of the story inputMessageReplyToStory story_poster_chat_id:int53 story_id:int32 = InputMessageReplyTo; -//@description Describes an ephemeral message to be replied; for bots only @ephemeral_message_id The identifier of the ephemeral message to be replied +//@description Describes an ephemeral message to be replied; for bots only @ephemeral_message_id The identifier of the ephemeral message to be replied inputMessageReplyToEphemeralMessage ephemeral_message_id:int32 = InputMessageReplyTo; @@ -5891,7 +5891,7 @@ inputPollMediaVideo video:inputVideo = InputPollMedia; //@class InputPageBlock @description Describes a block of a rich message to send -//@description A section heading @text Text of the section heading @size Realtive size of the text font; 1-6, 1 is the largest, 6 is the smallest +//@description A section heading @text Text of the section heading @size Relative size of the text font; 1-6, 1 is the largest, 6 is the smallest inputPageBlockSectionHeading text:RichText size:int32 = InputPageBlock; //@description A text paragraph @text Paragraph text @@ -12117,7 +12117,9 @@ resendMessages chat_id:int53 message_ids:vector<int53> quote:inputTextQuote paid //@sending_id Non-persistent identifier, which will be returned back in messageSendingStatePending object and can be used to match sent messages and corresponding updateNewMessage updates //@only_preview Pass true to get a fake message instead of actually sending them //@reply_markup Markup for replying to the message; pass null if none; for bots only -//@input_message_content The content of the message to be added. Must be one of the following types: inputMessageText, inputMessageRichMessage, inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto, inputMessageSticker, inputMessageVideo, inputMessageVideoNote, inputMessageVoiceNote, inputMessageLocation, inputMessageVenue, inputMessageContact +//@input_message_content The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageAnimation, +//-inputMessageAudio, inputMessageDocument, inputMessagePhoto, inputMessageSticker, inputMessageVideo, inputMessageVideoNote, inputMessageVoiceNote, +//-inputMessageLocation, inputMessageVenue, inputMessageContact sendEphemeralMessage chat_id:int53 topic_id:MessageTopic receiver_user_id:int53 reply_to:InputMessageReplyTo sending_id:int32 only_preview:Bool reply_markup:ReplyMarkup input_message_content:InputMessageContent = Message; //@description Adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message diff --git a/td/telegram/BusinessConnectionManager.cpp b/td/telegram/BusinessConnectionManager.cpp index 7e272ee69..312e4ca41 100644 --- a/td/telegram/BusinessConnectionManager.cpp +++ b/td/telegram/BusinessConnectionManager.cpp @@ -1758,14 +1758,13 @@ void BusinessConnectionManager::finish_upload_message_internal_media(int64 reque return promise.set_error(r_upload_result.move_as_error()); } } - vector<telegram_api::object_ptr<telegram_api::InputMedia>> input_media; + vector<telegram_api::object_ptr<telegram_api::InputMedia>> input_medias; for (auto &r_upload_result : upload_results) { auto upload_result = r_upload_result.move_as_ok(); - input_media.push_back(std::move(upload_result.input_media_)); + input_medias.push_back(std::move(upload_result.input_media_)); } - complete_send_media(std::move(message), - get_message_content_multi_input_media(message->content_.get(), td_, std::move(input_media)), - std::move(promise)); + auto input_media = get_message_content_multi_input_media(message->content_.get(), td_, std::move(input_medias)); + complete_send_media(std::move(message), std::move(input_media), std::move(promise)); } void BusinessConnectionManager::on_fail_send_message(unique_ptr<PendingMessage> &&message, const Status &error) { diff --git a/td/telegram/CommunityManager.cpp b/td/telegram/CommunityManager.cpp index 87340aef6..447f5723f 100644 --- a/td/telegram/CommunityManager.cpp +++ b/td/telegram/CommunityManager.cpp @@ -1,5 +1,5 @@ // -// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2025 +// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2026 // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/td/telegram/CommunityManager.h b/td/telegram/CommunityManager.h index 0dcbfdc06..46cd7403e 100644 --- a/td/telegram/CommunityManager.h +++ b/td/telegram/CommunityManager.h @@ -1,5 +1,5 @@ // -// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2025 +// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2026 // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/td/telegram/DraftMessageManager.cpp b/td/telegram/DraftMessageManager.cpp index 1812238cf..4bc6038b0 100644 --- a/td/telegram/DraftMessageManager.cpp +++ b/td/telegram/DraftMessageManager.cpp @@ -1,5 +1,5 @@ // -// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2025 +// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2026 // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/td/telegram/DraftMessageManager.h b/td/telegram/DraftMessageManager.h index 80d4dec29..ae02bd353 100644 --- a/td/telegram/DraftMessageManager.h +++ b/td/telegram/DraftMessageManager.h @@ -1,5 +1,5 @@ // -// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2025 +// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2026 // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/td/telegram/MessageQueryManager.cpp b/td/telegram/MessageQueryManager.cpp index 8c954cc4a..fc25b62b5 100644 --- a/td/telegram/MessageQueryManager.cpp +++ b/td/telegram/MessageQueryManager.cpp @@ -2130,6 +2130,10 @@ MessageQueryManager::MessageQueryManager(Td *td, ActorShared<> parent) : td_(td) send_message_view_metrics_timeout_.set_callback_data(static_cast<void *>(this)); } +MessageQueryManager::~MessageQueryManager() { + Scheduler::instance()->destroy_on_scheduler(G()->get_gc_scheduler_id(), rich_message_full_id_to_file_source_id_); +} + void MessageQueryManager::tear_down() { parent_.reset(); } diff --git a/td/telegram/MessageQueryManager.h b/td/telegram/MessageQueryManager.h index 9603c4ddb..da5b6ed54 100644 --- a/td/telegram/MessageQueryManager.h +++ b/td/telegram/MessageQueryManager.h @@ -53,6 +53,11 @@ class Td; class MessageQueryManager final : public Actor { public: MessageQueryManager(Td *td, ActorShared<> parent); + MessageQueryManager(const MessageQueryManager &) = delete; + MessageQueryManager &operator=(const MessageQueryManager &) = delete; + MessageQueryManager(MessageQueryManager &&) = delete; + MessageQueryManager &operator=(MessageQueryManager &&) = delete; + ~MessageQueryManager() final; using AffectedHistoryQuery = std::function<void(DialogId, Promise<AffectedHistory>)>; diff --git a/td/telegram/MessageReplyHeader.cpp b/td/telegram/MessageReplyHeader.cpp index 16e873def..69e6b4afb 100644 --- a/td/telegram/MessageReplyHeader.cpp +++ b/td/telegram/MessageReplyHeader.cpp @@ -59,7 +59,7 @@ MessageReplyHeader::MessageReplyHeader(Td *td, tl_object_ptr<telegram_api::Messa if (!message_id.is_scheduled() && can_have_thread && dialog_id.get_type() == DialogType::Channel) { if (!top_thread_message_id_.is_valid()) { auto same_chat_reply_to_message_id = replied_message_info_.get_same_chat_reply_to_message_id(false); - if (same_chat_reply_to_message_id.is_valid() && same_chat_reply_to_message_id.is_server()) { + if (same_chat_reply_to_message_id.is_server()) { top_thread_message_id_ = same_chat_reply_to_message_id; } else { is_topic_message_ = false; diff --git a/td/telegram/MessageTopic.hpp b/td/telegram/MessageTopic.hpp index 6bc93c6e6..2ff00785d 100644 --- a/td/telegram/MessageTopic.hpp +++ b/td/telegram/MessageTopic.hpp @@ -1,5 +1,5 @@ // -// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2025 +// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2026 // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 0dbe3a271..cec112a63 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -25228,7 +25228,6 @@ Result<td_api::object_ptr<td_api::message>> MessagesManager::send_ephemeral_mess } switch (input_message_content->get_id()) { case td_api::inputMessageText::ID: - case td_api::inputMessageRichMessage::ID: case td_api::inputMessageAnimation::ID: case td_api::inputMessageAudio::ID: case td_api::inputMessageDocument::ID: |
