Allow to change show_caption_above_media when replacing caption of a copied message.

This commit is contained in:
levlam 2024-05-20 14:54:53 +03:00
parent f32756cd0d
commit 34a52855ee

View File

@ -10020,7 +10020,9 @@ td::Status Client::process_copy_message_query(PromisedQueryPtr &query) {
if (replace_caption) {
TRY_RESULT_ASSIGN(caption, get_caption(query.get()));
}
auto options = make_object<td_api::messageCopyOptions>(true, replace_caption, std::move(caption), false);
auto show_caption_above_media = to_bool(query->arg("show_caption_above_media"));
auto options =
make_object<td_api::messageCopyOptions>(true, replace_caption, std::move(caption), show_caption_above_media);
check_message(
from_chat_id, message_id, false, AccessRights::Read, "message to copy", std::move(query),