Documentation menu

Dedup, replies & edits

Telegram Dedup, Reply & Edit Sync

SHA-256 content and album fingerprinting kills duplicate forwards, reply chains stay linked, and edits and deletions propagate within a bounded window.

Verified against the checkout built for v2.2.4 · updated 20 Oct 2026

On this page

ReliabilityNew in v2.0

Fingerprints cover albums too, so a re-posted media group is caught as one repeat, not five.

Content fingerprinting

  • SHA-256 fingerprints over normalized content and album membership are stored per task, so the same post arriving through two sources never lands twice.
  • Albums are fingerprinted as a group: a re-sent media group is one duplicate, not a partial re-delivery.
  • Fingerprints are tenant-scoped and pruned with retention, keeping the table bounded on long-running installs.
  • A message that was legitimately edited is allowed through again — dedup applies to content, not to message ids.

Conversation structure survives the move

When reply synchronisation is enabled, a reply in the source is delivered as a reply to the copied parent message in the target, with the mapping kept in the message_map table. Threads therefore stay readable instead of collapsing into a flat feed.

Mapping table responsibilities
TableWhat it maps
message_mapsource message id → target message id, per task and target, so replies and edits can find their counterpart.
content_dedupcontent fingerprint → first delivery, so duplicates are dropped before dispatch.
delivery_jobsthe durable queue: state, attempts, lease holder and next retry time.

Edits and deletes follow the message

  • An edited source message updates the delivered copy in place instead of posting again.
  • Edits older than max_time_edit are ignored, so a bulk edit of historical posts cannot rewrite weeks of archives.
  • If an edited message no longer satisfies the content policy, the delivered copy is deleted.
  • Deleting the source deletes the delivered copies — including every target of a multi-target task.

Turning each behaviour on

Per-task settings
atf rules settings set <task-id> sync_replies=true
atf rules settings set <task-id> max_time_edit=3600
atf rules settings get <task-id>

Frequently asked

Will the same post arriving from two different sources be forwarded twice?

Not within the same task. The content fingerprint is checked before dispatch, and a match is dropped as a duplicate.

Does a deleted source post delete my archive copy?

Yes, when deletion synchronisation is active: the mapping table identifies every delivered copy and removes it.

Can I keep the archive even when the source edits history?

Yes — set max_time_edit to a small window. Edits older than the window are ignored while live posts still update.

Keep reading