From ba9837f55ed97d17430ae42d1ba6edd399d7a334 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 25 Dec 2020 01:41:56 +0300 Subject: [PATCH] tg_cli: combine emp and empttl. --- td/telegram/cli.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index 9305b7346..eaf032779 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -3176,7 +3176,7 @@ class CliClient final : public Actor { send_request(td_api::make_object( as_chat_id(chat_id), as_message_id(message_id), nullptr, td_api::make_object(as_input_file(document), nullptr, false, as_caption("")))); - } else if (op == "emp") { + } else if (op == "emp" || op == "empttl") { string chat_id; string message_id; string photo; @@ -3185,17 +3185,7 @@ class CliClient final : public Actor { send_request(td_api::make_object( as_chat_id(chat_id), as_message_id(message_id), nullptr, td_api::make_object(as_input_file(photo), as_input_thumbnail(photo), Auto(), 0, 0, - as_caption(""), 0))); - } else if (op == "empttl") { - string chat_id; - string message_id; - string photo; - std::tie(chat_id, args) = split(args); - std::tie(message_id, photo) = split(args); - send_request(td_api::make_object( - as_chat_id(chat_id), as_message_id(message_id), nullptr, - td_api::make_object(as_input_file(photo), as_input_thumbnail(photo), Auto(), 0, 0, - as_caption(""), 10))); + as_caption(""), op == "empttl" ? 10 : 0))); } else if (op == "emvt") { string chat_id; string message_id;