Handle rich bot message fallback for macOS#4
Draft
ohld wants to merge 2 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds compatibility parsing for newer Telegram TL constructors seen by the macOS client when loading Bot API rich messages, including
richMessage, newer poll/media/update variants, reply headers, keyboard buttons, stories, gifts, and topic message containers.The goal is graceful fallback rendering instead of leaving bot rich messages as unsupported media placeholders.
Why
Recent bot messages using newer rich formatting can be delivered to this older macOS client as unsupported media. When the client later requests the rich message payload, parsing may fail on newer TL constructors such as
messageMediaPoll#773f4e66,poll#966e2dbf,pollResults#ba7bb15e, andupdateMessagePoll#d64c522b.Notes
messages.getRichMessageis tried before the older unsupported-media refresh methods.RichMessageblocks are converted into a plain-text fallback, preserving readable text when native rich block rendering is absent.Verification
swift buildinsubmodules/TelegramApi: passed.https://t.me/ohld_chat/35423after restart:This message is not supported: 0messageMediaUnsupported: 0d64c522b: 049e91f2a: 07600b9d3,baf39d8b,773f4e66,966e2dbf,ba7bb15e: 0Local test artifact from parent workspace:
/Users/ohld/Documents/GitHub/TelegramSwift/artifacts/Telegram-Dev-RichTest.dmgSHA256:
a4a572cbd789f140555753ffc436c686ba7fa7255b720c8e435dfca132af05a3