tg_cli: add updateNewMessage processing in test DC.
This commit is contained in:
parent
b41e36bea9
commit
11bbb5bfad
@ -834,6 +834,17 @@ class CliClient final : public Actor {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case td_api::updateNewMessage::ID: {
|
||||
auto message = static_cast<const td_api::updateNewMessage *>(result.get())->message_.get();
|
||||
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_) {
|
||||
on_cmd(PSTRING() << "sm " << chat_id << " Hi!");
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case td_api::file::ID:
|
||||
on_get_file(*static_cast<const td_api::file *>(result.get()));
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user