Add InputMessageText::add_dependencies.

This commit is contained in:
levlam 2023-10-17 12:31:01 +03:00
parent 8552180f0d
commit ba15f3e1ef
3 changed files with 9 additions and 1 deletions

View File

@ -162,7 +162,7 @@ bool DraftMessage::need_update_to(const DraftMessage &other, bool from_update) c
}
void DraftMessage::add_dependencies(Dependencies &dependencies) const {
add_formatted_text_dependencies(dependencies, &input_message_text_.text);
input_message_text_.add_dependencies(dependencies);
}
td_api::object_ptr<td_api::draftMessage> DraftMessage::get_draft_message_object() const {

View File

@ -64,6 +64,10 @@ Result<InputMessageText> process_input_message_text(const Td *td, DialogId dialo
force_small_media, force_large_media, input_message_text->clear_draft_};
}
void InputMessageText::add_dependencies(Dependencies &dependencies) const {
add_formatted_text_dependencies(dependencies, &text);
}
telegram_api::object_ptr<telegram_api::InputMedia> InputMessageText::get_input_media_web_page() const {
if (web_page_url.empty()) {
return nullptr;

View File

@ -14,6 +14,8 @@
namespace td {
class Dependencies;
class Td;
class InputMessageText {
@ -40,6 +42,8 @@ class InputMessageText {
return text.text.empty() && web_page_url.empty();
}
void add_dependencies(Dependencies &dependencies) const;
telegram_api::object_ptr<telegram_api::InputMedia> get_input_media_web_page() const;
td_api::object_ptr<td_api::inputMessageText> get_input_message_text_object() const;