From bb252ab8edc1fc3b85bf8c4445226ce5874063fd Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 23 Jun 2021 13:10:20 +0300 Subject: [PATCH] tg_cli: don't reply to outgoing /start messages. --- td/telegram/cli.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index feaa192ac..d9b1fd3d5 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -833,7 +833,7 @@ class CliClient final : public Actor { if (message != nullptr && message->content_->get_id() == td_api::messageText::ID) { auto chat_id = message->chat_id_; auto text = static_cast(message->content_.get())->text_->text_; - if (text == "/start" && use_test_dc_) { + if (text == "/start" && !message->is_outgoing_ && use_test_dc_) { on_cmd(PSTRING() << "sm " << chat_id << " Hi!"); } }