Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

A Telegram Approval Queue Needs More Than a Send Button

说明与用途

文章描述了一个 Telegram 机器人工作流程,使用独立的 JSONL 文件分别存储草稿、操作员批准和实际投递,确保准确的状态跟踪并能在工作器重启时保持可靠性。

问题

Ensuring that a Telegram operator workflow correctly distinguishes between drafted replies, human approval, and actual delivery, avoiding reporting defects and maintaining durable state across worker restarts.

结果

The workflow now accurately tracks the lifecycle of a message from draft to approval to delivery, with clear separation of responsibilities and durable state that survives worker restarts.

工作流

  • 1. Drafts are created and stored in a drafts feed.
  • 2. Operator reviews a draft and can approve or request revision via Telegram buttons.
  • 3. On approval, the bot assigns a new draft identifier and moves the record to the outbox feed.
  • 4. The outbox record is queued for delivery; delivery component may be unavailable at this point.
  • 5. Delivery outcomes are recorded in an events feed once confirmed.
  • 6. If a revision is requested, a new draft is created and the old card is closed; operators see pending revisions.
  • 7. The bot verifies callback actions against server-side state to prevent approving outdated drafts.
  • 8. Delivery uncertainty is handled by recording explicit states and reconciling with destination history before retrying.

证据

I use a Telegram operator workflow to review drafted replies before anything can reach a recipient.

来源

The operator approved the replacements, and the approved records reached the outbox. The delivery component was unavailable at that checkpoint.

来源

The recorded workflow uses newline-delimited JSON files between components.

来源

The bot's callback handler rejected actions on drafts whose stored status was no longer “shown.”

来源

For a production sender, I would use a stable delivery reference, exclusive claiming, and durable result recording.

来源

  • 记录日期: 2026-10-24T19:26:19.083Z