pengrad / java-telegram-bot-api

Telegram Bot API for Java

Home Page:https://core.telegram.org/bots

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

replyMarkup is not working for multicontent messages

kcejka opened this issue · comments

Adding replyMarkup is working fine for existing single content (video, photo) messages.
With multicontent (media_group_id is set) messages replyMarkup is not shown. No error is raised.

InlineKeyboardButton button1 = new InlineKeyboardButton("FW 1").callbackData("forwardTo1"); InlineKeyboardButton button2 = new InlineKeyboardButton("FW 2").callbackData("forwardTo2"); InlineKeyboardMarkup replyMarkup = new InlineKeyboardMarkup().addRow(button1,button2); bot.execute(new EditMessageReplyMarkup(CH_1, messageChannel.messageId()).replyMarkup(replyMarkup));

Yes it is impossible to set replyMarkup on SendMediaGroup method or edit it for individual message later.
There is an error in Response object.

response.isOk() -> false
response.description() -> Bad Request: message is not modified: specified new message content and reply markup are exactly the same as a current content and reply markup of the message
response.errorCode() -> 400