Add and use MessageInputReplyTo::clone().
This commit is contained in:
parent
6650e2e91c
commit
1b448b93e5
@ -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,
|
||||
|
@ -23889,12 +23889,12 @@ Result<td_api::object_ptr<td_api::messages>> MessagesManager::send_message_group
|
||||
unique_ptr<Message> message;
|
||||
Message *m;
|
||||
if (message_send_options.only_preview) {
|
||||
message = create_message_to_send(d, top_thread_message_id, std::move(input_reply_to), message_send_options,
|
||||
message = create_message_to_send(d, top_thread_message_id, input_reply_to.clone(), message_send_options,
|
||||
std::move(message_content.content), message_content.invert_media, i != 0,
|
||||
nullptr, DialogId(), false, DialogId());
|
||||
m = message.get();
|
||||
} else {
|
||||
m = get_message_to_send(d, top_thread_message_id, std::move(input_reply_to), message_send_options,
|
||||
m = get_message_to_send(d, top_thread_message_id, input_reply_to.clone(), message_send_options,
|
||||
dup_message_content(td_, dialog_id, message_content.content.get(),
|
||||
MessageContentDupType::Send, MessageCopyOptions()),
|
||||
message_content.invert_media, &need_update_dialog_pos, i != 0);
|
||||
|
Loading…
Reference in New Issue
Block a user