From c0447700221b2ec19d2243ca9cb8a57ec5aa0508 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 10 Apr 2020 04:16:50 +0300 Subject: [PATCH] Simplify messages.sendMedia creation. GitOrigin-RevId: 8a8ad7b0e88e459f30104d2f6dd6084ddbac8a36 --- td/telegram/MessagesManager.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 740d8976..37c9c686 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -2230,12 +2230,10 @@ class SendMediaActor : public NetActorOnce { flags |= telegram_api::messages_sendMedia::ENTITIES_MASK; } - telegram_api::messages_sendMedia request(flags, false /*ignored*/, false /*ignored*/, false /*ignored*/, - std::move(input_peer), reply_to_message_id.get_server_message_id().get(), - std::move(input_media), text, random_id, std::move(reply_markup), - std::move(entities), schedule_date); - LOG(INFO) << "Send media: " << to_string(request); - auto query = G()->net_query_creator().create(request); + auto query = G()->net_query_creator().create(telegram_api::messages_sendMedia( + flags, false /*ignored*/, false /*ignored*/, false /*ignored*/, std::move(input_peer), + reply_to_message_id.get_server_message_id().get(), std::move(input_media), text, random_id, + std::move(reply_markup), std::move(entities), schedule_date)); if (G()->shared_config().get_option_boolean("use_quick_ack") && was_uploaded_) { query->quick_ack_promise_ = PromiseCreator::lambda( [random_id](Unit) {