Allow to start bots with sendBotStartMessage.

GitOrigin-RevId: 1dd84ae576c463a60189b0cdd9642bb8c10f8820
This commit is contained in:
levlam 2020-04-30 23:21:37 +03:00
parent 0eb0654bd6
commit c7003cda2b

View File

@ -19343,8 +19343,13 @@ Result<MessageId> MessagesManager::send_bot_start_message(UserId bot_user_id, Di
send_update_chat_last_message(d, "send_bot_start_message"); send_update_chat_last_message(d, "send_bot_start_message");
} }
save_send_bot_start_message_logevent(bot_user_id, dialog_id, parameter, m); if (parameter.empty() && is_chat_with_bot) {
do_send_bot_start_message(bot_user_id, dialog_id, parameter, m); save_send_message_logevent(dialog_id, m);
do_send_message(dialog_id, m);
} else {
save_send_bot_start_message_logevent(bot_user_id, dialog_id, parameter, m);
do_send_bot_start_message(bot_user_id, dialog_id, parameter, m);
}
return m->message_id; return m->message_id;
} }