tg_cli: add gmf.

GitOrigin-RevId: 6fb0ca0dc371e650bc42f6bd86601ae9d1720a26
This commit is contained in:
levlam 2019-03-05 02:06:48 +03:00
parent 1ee2b63230
commit b20d9ba6d6

View File

@ -2307,6 +2307,16 @@ class CliClient final : public Actor {
string message_id;
std::tie(chat_id, message_id) = split(args);
send_request(td_api::make_object<td_api::getMessage>(as_chat_id(chat_id), as_message_id(message_id)));
} else if (op == "gmf") {
string chat_id;
string from_message_id_str;
string to_message_id_str;
std::tie(chat_id, args) = split(args);
std::tie(from_message_id_str, to_message_id_str) = split(args);
auto to_message_id = to_integer<int32>(to_message_id_str);
for (auto message_id = to_integer<int32>(from_message_id_str); message_id <= to_message_id; message_id++) {
send_request(td_api::make_object<td_api::getMessage>(as_chat_id(chat_id), message_id << 20));
}
} else if (op == "gml") {
string chat_id;
string message_id;