diff options
| author | levlam <levlam@telegram.org> | 2024-03-13 16:08:49 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2024-03-13 16:08:49 +0300 |
| commit | 1b448b93e5ce1e54f03fe5032eac97a589392d9e (patch) | |
| tree | ce061fc1fd31d4f6c7586a68de54ef6e5fc56b99 /td/telegram/MessageInputReplyTo.h | |
| parent | 6650e2e91c058af30baa9ec455eed0a87f795b2d (diff) | |
Add and use MessageInputReplyTo::clone().
Diffstat (limited to 'td/telegram/MessageInputReplyTo.h')
| -rw-r--r-- | td/telegram/MessageInputReplyTo.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/td/telegram/MessageInputReplyTo.h b/td/telegram/MessageInputReplyTo.h index 780448115..3fa0bb3c5 100644 --- a/td/telegram/MessageInputReplyTo.h +++ b/td/telegram/MessageInputReplyTo.h @@ -79,6 +79,13 @@ class MessageInputReplyTo { return story_full_id_; } + MessageInputReplyTo clone() const { + if (story_full_id_.is_valid()) { + return MessageInputReplyTo(story_full_id_); + } + return MessageInputReplyTo(message_id_, dialog_id_, FormattedText(quote_), quote_position_); + } + void add_dependencies(Dependencies &dependencies) const; telegram_api::object_ptr<telegram_api::InputReplyTo> get_input_reply_to(Td *td, |
