Skip to content

fix(telegram): make native draft streaming opt-in - #822

Merged
bensabic merged 2 commits into
mainfrom
josh/telegram-native-streaming-fallback
Aug 14, 2026
Merged

fix(telegram): make native draft streaming opt-in#822
bensabic merged 2 commits into
mainfrom
josh/telegram-native-streaming-fallback

Conversation

@dancer

@dancer dancer commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

summary

before: private chat streams used native Telegram drafts by default, which could remain visible over the final message on Telegram macOS

after: streams use post-and-edit by default across Telegram clients, while native drafts remain available as an opt-in

test plan

  • verify the default returns control to post-and-edit without consuming the stream
  • verify thread.post(stream) uses sendMessage and editMessageText without calling a draft API
  • verify native draft streaming still works when explicitly enabled
  • run Telegram adapter tests
  • run integration tests
  • run typecheck, build, and formatting checks
  • verify the behavior against the current Telegram Bot API and live response streaming documentation

Signed-off-by: dancer <josh@afterima.ge>
@dancer
dancer requested a review from a team as a code owner August 13, 2026 16:05
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview, v0 Aug 14, 2026 5:17am
chat-sdk-nextjs-chat Ready Ready Preview Aug 14, 2026 5:17am

The adapter now owns the post-and-edit loop instead of returning null and
deferring to the chat core fallback, so streamed edits stay under
Telegram's per-chat limit of roughly one message per second. Edits
throttle to a new streamingEditIntervalMs floor (default 1100ms), and a
rate-limited final edit retries once rather than rejecting out of
thread.post() and leaving the placeholder in place.

Also document nativeStreaming and streamingEditIntervalMs in the adapter
docs, README, and adapter catalog, correct the Telegram row in the
streaming docs, and bump the changeset to minor since this adds public
config surface.

Signed-off-by: Ben Sabic <bensabic@users.noreply.github.com>
@bensabic
bensabic merged commit 3bbf3ff into main Aug 14, 2026
18 checks passed
@bensabic
bensabic deleted the josh/telegram-native-streaming-fallback branch August 14, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Telegram: leaked streaming draft renders over the finalized message on Telegram macOS

2 participants