Documentation menu
Getting started
New in v2.0
Feature deep dives
Reference
Media & Albums
Media, Albums & Copy-Protection Bypass
How albums, large documents, video notes and ChatForwardsRestricted content are handled — including download-and-reupload bypass.
Verified against the checkout built for v2.2.4 · updated 20 Oct 2026
Overview
Telegram media forwarding presents unique technical challenges: albums arrive as separate asynchronous MTProto messages sharing a media_group_id, while private or copyrighted channels frequently lock content using Telegram's ChatForwardsRestricted flag.
Atomic Album Aggregation
When an album of 2 to 10 photos or videos is posted, Telegram delivers distinct updates with an identical media_group_id. Naive forwarders dispatch each item separately, cluttering destination channels.
0.8-Second Debounce Buffer
AutoTelegramForward intercepts album fragments in memory, buffers incoming parts for 800ms, and groups them into an album_messages collection.
↓ Debounce Aggregation Window (800ms)
Output: Single
send_media_group() delivery containing all 5 items + cleaned captionCopy-Protection Bypass (ChatForwardsRestricted)
When channel owners enable "Restrict saving content" in Telegram settings, attempting a native MTProto forward_messages() call fails immediately with:
pyrogram.errors.ChatForwardsRestricted: Telegram says: [400 CHAT_FORWARDS_RESTRICTED]AutoTelegramForward features an automatic, seamless bypass:
- The forwarding worker catches
ChatForwardsRestricted. - The worker automatically downloads the media binary to a temporary stream.
- Applies all configured Cleaners and Header/Footer templates to the caption.
- Uploads the media as an authentic fresh post to the destination chat using
send_photo,send_video, orsend_document. - Cleans up temporary disk buffers immediately.