From f8abeef8adb64ef7e3d10ee808f37d3f49eb98b9 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 5 Mar 2020 20:11:35 +0300 Subject: [PATCH] tg_cli: add spgttl and SMU. GitOrigin-RevId: d9dc7e88a596faea73852bdb97f58b14a134c41b --- td/telegram/cli.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index 4859031dc..a35fb3f4a 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -1831,6 +1831,19 @@ class CliClient final : public Actor { send_request(td_api::make_object(as_chat_id(chat_id), "", my_id_, 0, 0, to_integer(limit), nullptr)); + } else if (op == "SMU") { + string chat_id; + string user_id; + string limit; + + std::tie(chat_id, args) = split(args); + std::tie(user_id, limit) = split(args); + if (limit.empty()) { + limit = "10"; + } + + send_request(td_api::make_object(as_chat_id(chat_id), "", as_user_id(user_id), 0, 0, + to_integer(limit), nullptr)); } else if (op == "SM") { string chat_id; string filter; @@ -3230,7 +3243,7 @@ class CliClient final : public Actor { send_message(chat_id, td_api::make_object( as_input_file(photo_path), nullptr, std::move(sticker_file_ids), 0, 0, as_caption(op == "spcaption" ? "cap \n\n\n\n tion " : ""), op == "spttl" ? 10 : 0)); - } else if (op == "spg") { + } else if (op == "spg" || op == "spgttl") { string chat_id; string photo_path; string conversion; @@ -3241,7 +3254,7 @@ class CliClient final : public Actor { send_message(chat_id, td_api::make_object( as_generated_file(photo_path, conversion, to_integer(expected_size)), nullptr, - vector(), 0, 0, as_caption(""), 0)); + vector(), 0, 0, as_caption(""), op == "spgttl" ? 10 : 0)); } else if (op == "spt") { string chat_id; string photo_path;