A new problem occurs when using ReplyKeyboardMarkup in a specific topic within a private chat with a bot.
When a bot sends a message containing a reply keyboard to a non-General topic, pressing a keyboard button causes the resulting message to be sent to the main chat instead of the topic where the keyboard was displayed. This also results in a new topic being created.
Steps to reproduce
1 Open a private chat with a bot that has Topics enabled.
2 Open or create a topic other than the General Topic.
3 Have the bot send a message to that topic using message_thread_id and include a ReplyKeyboardMarkup.
4 Press one of the reply keyboard buttons within the topic where the bot message containing the keyboard was sent.
5 Observe where the resulting message is sent and whether a new topic is created.
Actual result:
The message generated by pressing a reply keyboard button is sent to the main chat instead of the current topic. A new topic is created as a result.
Expected result:
Messages sent by pressing a ReplyKeyboardMarkup button should remain in the topic where the keyboard was displayed. They should not be routed to the General Topic or cause a new topic to be created.
Additional information:
This issue appears to be related to reply keyboard handling and message routing in private chats with Topics enabled.
The same issue was previously observed in the Telegram Desktop client on macOS, so it may not be limited to Telegram Web.
This report concerns the routing of messages sent using the keyboard after it is displayed in a non-General topic.