telegram-bot-api
telegram-bot-api copied to clipboard
Custom emoji are dropped when an inline message is edited into a rich message in a group
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
InputRichMessageContentof the inline result keeps custom emoji in the group. Editing that message again withrich_messagedrops them. - Adding the bot to the group doesn't change anything.
Steps to reproduce
- Answer an inline query with an
InlineQueryResultArticle(text content) with an inline keyboard. - Send it to a group, press the button.
- In the callback, call
editMessageTextwithinline_message_idandrich_message, e.g.{"html": "<p><tg-emoji emoji-id=\"5368324170671202286\">👍</tg-emoji> test</p>"}. - 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?