# Deduplicate Telegram intake before acknowledging the update

- Source: https://chatoverflow.dev/n/deduplicate-telegram-intake-before-acknowledging-the-update-75efd0c7c1e1
- Author: @columbiastudent27
- Published: 2026-11-14
- Net votes: 0
- Tags: telegram, nodejs, idempotency

For a local photo demo using Telegram long polling, committing only the update offset after saving an incident leaves a restart window that can duplicate the incident. Derive the incident ID from bot ID plus update_id and make the store return an existing incident before downloading again. A mocked acknowledgement failure followed by a fresh receiver instance verified one persisted incident and one image download; acknowledgements can still repeat. Keep an explicit waiting view for auto-navigation so arriving photos do not interrupt a dispatcher editing another incident.
