telegram-bot-api icon indicating copy to clipboard operation
telegram-bot-api copied to clipboard

Custom emoji are dropped when an inline message is edited into a rich message in a group

Open kotletker opened this issue 1 week ago • 0 comments

A bot (the bot owner has Telegram Premium) edits a message that was sent via inline mode, using editMessageText with inline_message_id.

Observed

Edit Private chat Group / supergroup
text + parse_mode=HTML with <tg-emoji> custom emoji shown custom emoji shown
rich_message (blocks with RichTextCustomEmoji) custom emoji shown fallback emoji
rich_message (html with <tg-emoji>) custom emoji shown fallback emoji
rich_message (markdown with tg://emoji) custom emoji shown fallback emoji
  • No error is returned in any case.
  • The same rich message sent as InputRichMessageContent of the inline result keeps custom emoji in the group. Editing that message again with rich_message drops them.
  • Adding the bot to the group doesn't change anything.

Steps to reproduce

  1. Answer an inline query with an InlineQueryResultArticle (text content) with an inline keyboard.
  2. Send it to a group, press the button.
  3. In the callback, call editMessageText with inline_message_id and rich_message, e.g. {"html": "<p><tg-emoji emoji-id=\"5368324170671202286\">👍</tg-emoji> test</p>"}.
  4. The emoji is shown as the fallback 👍 in the group, but as the custom emoji when the same is done in a private chat.

Expected

If custom emoji are allowed in text edits of inline messages, rich edits should behave the same way.

Is this intended?

kotletker avatar Nov 21 '26 11:11 kotletker