Repository navigation
refactor(telegram): split outbound send operations - #113222
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
July 24, 2026 05:02
steipete
force-pushed
the
refactor/telegram-send-split
branch
from
July 24, 2026 06:18
b16a77e to
f43e88f
Compare
steipete
force-pushed
the
refactor/telegram-send-split
branch
from
July 24, 2026 06:27
f43e88f to
f8dd7de
Compare
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 25, 2026
* refactor(telegram): split outbound send operations * refactor(telegram): keep test handle in send barrel
This was referenced Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
The Telegram outbound transport had grown into a 2,771-line module with a grandfathered max-lines suppression. That made ownership boundaries hard to review and forced unrelated send, edit, media, forum-topic, and action changes through one file.
Why This Change Was Made
This maintainer-requested refactor splits the existing implementation along cohesive transport boundaries: API/client lifetime, message text delivery, media orchestration, edits, generic actions, forum topics, locations, and poll/sticker sends. The existing
send.tsentry point remains a narrow barrel, so callers and exported behavior are unchanged; the max-lines suppression and baseline entry are removed.The production diff grows by 247 lines because each module now declares its own static imports and narrow cross-module type contract. It adds no runtime branch, fallback, config, protocol, or compatibility path. Every resulting production module is at most 604 lines.
AI-assisted: yes. The implementation was reviewed with the repository autoreview workflow.
User Impact
No user-visible behavior change. Telegram outbound payload construction, fallback ordering, chunking, media delivery, edits, actions, and public imports remain unchanged, while future maintenance can be scoped to smaller owner modules.
Evidence
node scripts/run-vitest.mjs extensions/telegram/src/send.chunks.test.ts— 3 passed.node scripts/run-vitest.mjs extensions/telegram/src/send.test.ts— 176 passed.node scripts/run-vitest.mjs extensions/telegram/src/outbound-adapter.test.ts— 37 passed.node scripts/check-changed.mjs -- <touched files>— passed all selected extension production/test typechecks, extension lint, formatting, max-lines ratchet, plugin-boundary guards, and runtime import-cycle checks. Testbox run: https://github.com/openclaw/openclaw/actions/runs/30067696378corepack pnpm deadcode:exports— production, full-tree, and script unused-export scans all passed with 0 entries. Testbox run: https://github.com/openclaw/openclaw/actions/runs/30068198961$HOME/.claude/skills/autoreview/scripts/autoreview --mode branch --base origin/main— clean, no accepted/actionable findings.