From 1416cb13b2fd61ee6cc0c399ec430763c34b561f Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 23 Dec 2022 19:11:52 +0300 Subject: [PATCH] tg_cli: randomize sendMessageAlbum testing. --- td/telegram/cli.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index 173d0b323..8f27574dd 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -3772,8 +3772,9 @@ class CliClient final : public Actor { get_args(args, reply_to_message_id, args); } auto input_message_contents = transform(full_split(args), [this](const string &photo) { - td_api::object_ptr content = td_api::make_object( - as_input_file(photo), nullptr, Auto(), 0, 0, as_caption(""), message_ttl_, has_spoiler_); + td_api::object_ptr content = + td_api::make_object(as_input_file(photo), nullptr, Auto(), 0, 0, as_caption(""), + rand_bool() ? message_ttl_ : 0, has_spoiler_ && rand_bool()); return content; }); send_request(td_api::make_object(