Support Telegram Guest Mode reply-to-transcribe flow #188

Merged
backmeupplz merged 2 commits from codex/voi-kaneo-65-guest-mode into main 2026-05-11 19:49:24 +00:00
backmeupplz commented 2026-05-11 18:45:41 +00:00 (Migrated from github.com)

Summary

  • accept Bot API 10.0 guest_message updates and answer them with a narrow answerGuestQuery compatibility shim
  • route reply-to-media Guest Mode interactions into the existing transcription queue while storing guestQueryId and tracked guest inline message ids
  • track duplicate Guest Mode subscribers for already-active media jobs so every guest progress reply receives later progress/final edits
  • edit guest inline replies for progress/final transcript output, add localized unsupported-media/truncation copy, and document BotFather enablement plus Guest Mode limitations

Validation

  • yarn build-ts passed
  • yarn lint passed
  • yarn test:guest-mode passed, including active-job guest dedupe subscriber proof and multi-inline progress/final edit proof
  • yarn test:transcription-cache passed
  • yarn test:progress-status-format passed
  • yarn test:transcription-finalization passed
  • yarn audit-locales passed

Manual QA

Required after BotFather setup: enable Guest Mode for @voicybot, then use a real Telegram account in a supported chat where @voicybot is not a member. Reply to a transcribable voice/audio/video message with @voicybot; expect one guest reply that starts as progress and is edited to the transcript or localized failure/empty result. Repeat while the same media is already being processed; expect the duplicate guest reply to also receive the final edit. Also reply to a non-media message with @voicybot; expect the concise media-instruction reply.

## Summary - accept Bot API 10.0 `guest_message` updates and answer them with a narrow `answerGuestQuery` compatibility shim - route reply-to-media Guest Mode interactions into the existing transcription queue while storing `guestQueryId` and tracked guest inline message ids - track duplicate Guest Mode subscribers for already-active media jobs so every guest progress reply receives later progress/final edits - edit guest inline replies for progress/final transcript output, add localized unsupported-media/truncation copy, and document BotFather enablement plus Guest Mode limitations ## Validation - `yarn build-ts` passed - `yarn lint` passed - `yarn test:guest-mode` passed, including active-job guest dedupe subscriber proof and multi-inline progress/final edit proof - `yarn test:transcription-cache` passed - `yarn test:progress-status-format` passed - `yarn test:transcription-finalization` passed - `yarn audit-locales` passed ## Manual QA Required after BotFather setup: enable Guest Mode for `@voicybot`, then use a real Telegram account in a supported chat where `@voicybot` is not a member. Reply to a transcribable voice/audio/video message with `@voicybot`; expect one guest reply that starts as progress and is edited to the transcript or localized failure/empty result. Repeat while the same media is already being processed; expect the duplicate guest reply to also receive the final edit. Also reply to a non-media message with `@voicybot`; expect the concise media-instruction reply.
backmeupplz commented 2026-05-11 19:00:17 +00:00 (Migrated from github.com)

Review blocker found: the guest-mode active-job dedupe path can leave users stuck on a progress message.

When a guest request hits an already-active transcription (src/handlers/handleAudio.ts:164), the code answers the new guest_query_id with a progress message, but it does not persist the returned inline_message_id or attach it to the existing job. The worker later only edits job.guestInlineMessageId, so this deduped guest reply will never receive the final transcript/failure update.

Local gates I ran:

  • yarn test:guest-mode passed
  • yarn build-ts passed

Please either track guest inline subscribers for active jobs, avoid sending a guest progress reply that implies completion, or return a completion-compatible response for deduped active jobs.

Review blocker found: the guest-mode active-job dedupe path can leave users stuck on a progress message. When a guest request hits an already-active transcription (`src/handlers/handleAudio.ts:164`), the code answers the new `guest_query_id` with a progress message, but it does not persist the returned `inline_message_id` or attach it to the existing job. The worker later only edits `job.guestInlineMessageId`, so this deduped guest reply will never receive the final transcript/failure update. Local gates I ran: - `yarn test:guest-mode` passed - `yarn build-ts` passed Please either track guest inline subscribers for active jobs, avoid sending a guest progress reply that implies completion, or return a completion-compatible response for deduped active jobs.
backmeupplz commented 2026-05-11 19:31:37 +00:00 (Migrated from github.com)

Follow-up review after 1613c1c: the active-job Guest Mode subscriber blocker from my earlier comment is resolved. The patch now stores additional guest inline message ids and edits all tracked guest replies for progress/final output.

Local gates I reran from an isolated PR worktree:

  • yarn build-ts passed
  • yarn test:guest-mode passed
  • yarn test:transcription-cache passed
  • yarn test:progress-status-format passed
  • yarn test:transcription-finalization passed
  • yarn audit-locales passed

I did not merge because the task still requires real Telegram Guest Mode QA after BotFather enablement: summon @voicybot from a chat where it is not a member, verify media reply progress/final edit, duplicate active-job behavior, and the non-media instruction reply.

Follow-up review after `1613c1c`: the active-job Guest Mode subscriber blocker from my earlier comment is resolved. The patch now stores additional guest inline message ids and edits all tracked guest replies for progress/final output. Local gates I reran from an isolated PR worktree: - `yarn build-ts` passed - `yarn test:guest-mode` passed - `yarn test:transcription-cache` passed - `yarn test:progress-status-format` passed - `yarn test:transcription-finalization` passed - `yarn audit-locales` passed I did not merge because the task still requires real Telegram Guest Mode QA after BotFather enablement: summon `@voicybot` from a chat where it is not a member, verify media reply progress/final edit, duplicate active-job behavior, and the non-media instruction reply.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
backmeupplz/voicy!188
No description provided.