Telegram-iOS/submodules/TelegramCore/Sources/Utils
isaac 0050cc7a08 Rich-message media in gallery/shared-media/preview pipelines via Message.effectiveMedia
Add Message/EngineMessage.effectiveMedia (= message.media when non-empty, else
richText.instantPage.allMedia()) and route the media-consuming sites through it
so a rich message's instant-page media participates in the same pipelines as
normal message.media: shared-media grids/file-rows, search media grid, gallery
open + item nodes + footer, the peer audio/voice playlist, secret-media preview,
resource-by-id resolution, recent downloads, downloaded-media store, delete-time
resource cleanup, cache-usage stats, the in-chat download manager, and the
context-menu / share actions (Save to Camera Roll, copy image, save audio/music
to files). For normal messages effectiveMedia == message.media, so each swap is
behavior-preserving; rich messages render their own bubble via
ChatMessageRichDataBubbleContentNode (not the text/file bubbles), so those paths
are deliberately untouched, as are the forward path (the attribute travels with
the forward) and the markdown-based rich-edit path. First-media scope for now.

See docs/instantpage-richtext.md for the full architecture + invariants.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 23:46:56 +02:00
..
AutomaticCacheEviction.swift Various improvements 2026-03-13 14:54:44 +01:00
CanSendMessagesToPeer.swift Various improvements 2026-04-28 14:31:17 +02:00
Coding.swift Refactoring 2021-08-04 01:30:57 +02:00
DecryptedResourceData.swift
FlatBuffersUtils.swift Fix flatbuffers serialization 2025-03-25 12:36:31 +01:00
ImageRepresentationsUtils.swift Cleanup 2025-06-28 13:14:15 +02:00
JSON.swift Refactor constructor use sites for types 180-189 to struct pattern 2026-01-17 22:27:04 +08:00
Log.swift [WIP] Quotes 2023-10-13 15:24:53 +04:00
MD5.swift
MediaResourceNetworkStatsTag.swift [WIP] Dynamic video streaming 2024-09-18 01:04:29 +08:00
MemoryBufferExtensions.swift Refactoring 2021-07-07 01:59:12 +04:00
MessageReadMetricsTracker.swift Metrics 2026-03-10 11:54:23 +01:00
MessageUtils.swift Rich-message media in gallery/shared-media/preview pipelines via Message.effectiveMedia 2026-06-04 23:46:56 +02:00
PeerUtils.swift Postbox refactor waves 278-356: squash 2026-05-05 14:11:06 +02:00
StoredMessageFromSearchPeer.swift Postbox -> TelegramEngine waves 46-93 (squashed) 2026-04-25 20:48:15 +04:00
StringFormat.swift Refactor string generation 2021-07-20 11:57:50 +02:00
TelegramMedia_FlatBuffers.swift FlatBuffers implementation debugging 2025-03-19 18:56:39 +01:00
UpdateMessageMedia.swift Support typing drafts 2025-08-15 09:18:11 +02:00