tg_cli: don't reply to outgoing /start messages.

This commit is contained in:
levlam 2021-06-23 13:10:20 +03:00
parent 9628668def
commit bb252ab8ed

View File

@ -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<const td_api::messageText *>(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!");
}
}