Telegram-iOS/submodules/TextFormat/Sources
isaac 3ed8c926a8 Custom emoji in markdown rich messages (send + round-trip)
Parse custom emoji into RichText.textCustomEmoji when sending markdown
rich messages, and round-trip them through edit, copy, and paste using a
shared tg://emoji?id=<fileId> markdown-link marker.

- Send: rewrite each customEmoji input attribute into a
  [<alt>](tg://emoji?id=<fileId>) marker before the CommonMark parse, then
  intercept the marker URL afterward to emit .textCustomEmoji. Only rich
  messages are affected; a custom emoji alone stays on the entity path.
- Reverse: InstantPageToMarkdown (whole-message copy + edit reconstruction)
  and InstantPageMultiTextAdapter (selection copy) emit the marker;
  edit-load and chat paste reattach it as a live customEmoji attribute.
- Marker helpers shared in TextFormat/CustomEmojiMarkdownMarker.swift.
- Rich sends now pass inlineStickers so recipients can fetch the files.

Follow-up to verify at runtime: recipient rendering goes out with
Api.InputRichMessage.documents: nil; if recipients see only the fallback
glyph, populate documents: in apiInputRichMessage().

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 17:51:37 +02:00
..
AddFormatToStringWithRanges.swift Refactor wallet-related modules 2019-10-08 14:30:24 +04:00
ChatTextInputAttributes.swift Merge commit 'c64653ed37' 2026-05-14 12:45:26 +02:00
CountNicePercent.swift Refactoring 2023-10-13 17:45:00 +04:00
CustomEmojiMarkdownMarker.swift Custom emoji in markdown rich messages (send + round-trip) 2026-05-31 17:51:37 +02:00
DateFormat.swift Added dates in poll results 2026-02-22 01:37:19 +04:00
GenerateTextEntities.swift Update localization 2026-02-24 19:12:54 +04:00
StringPadding.swift Wallet send & receive screens 2019-09-21 01:30:01 +03:00
StringWithAppliedEntities.swift Merge commit 'c64653ed37' 2026-05-14 12:45:26 +02:00
TelegramAttributes.swift Formatted date support 2026-02-06 14:24:03 +04:00