diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index dcfddbc6..70359264 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -1283,6 +1283,10 @@ class CliClient final : public Actor { query_id_to_send_message_info_[id].start_time = Time::now(); } + td_api::object_ptr default_send_message_options() const { + return td_api::make_object(false, false, as_message_scheduling_state(schedule_date_)); + } + void send_get_background_url(td_api::object_ptr &&background_type) { send_request(td_api::make_object("asd", std::move(background_type))); } @@ -2541,9 +2545,9 @@ class CliClient final : public Actor { std::tie(from_chat_id, message_ids) = split(args); auto chat = as_chat_id(chat_id); - send_request(td_api::make_object(chat, as_chat_id(from_chat_id), - as_message_ids(message_ids), nullptr, op[2] == 'g', - op[0] == 'c', Random::fast(0, 1) == 1)); + send_request(td_api::make_object( + chat, as_chat_id(from_chat_id), as_message_ids(message_ids), default_send_message_options(), op[2] == 'g', + op[0] == 'c', Random::fast(0, 1) == 1)); } else if (op == "resend") { string chat_id; string message_ids; @@ -2796,7 +2800,7 @@ class CliClient final : public Actor { photos = full_split(args); send_request(td_api::make_object( - as_chat_id(chat_id), as_message_id(reply_to_message_id), nullptr, + as_chat_id(chat_id), as_message_id(reply_to_message_id), default_send_message_options(), transform(photos, [](const string &photo_path) { td_api::object_ptr content = td_api::make_object( as_input_file(photo_path), nullptr, Auto(), 0, 0, as_caption(""), 0); @@ -2925,7 +2929,7 @@ class CliClient final : public Actor { auto chat = as_chat_id(chat_id); send_request(td_api::make_object( - chat, 0, nullptr, to_integer(query_id), result_id, op == "siqrh")); + chat, 0, default_send_message_options(), to_integer(query_id), result_id, op == "siqrh")); } else if (op == "gcqr") { string chat_id; string message_id;