fix(telegram): never emit a bare 'undefined' to the user (DIVE-1674)#12
Merged
Conversation
Guard every send choke point across all telegram-* forks so an accidental undefined/empty/'undefined' text can never be delivered: - transport middleware (bot.api.config.use) in claude/grok/codex/agy/opencode/pi throws instead of sending when text is null, empty-after-trim, or the literal string 'undefined' (opencode/pi previously had no such middleware — added). - claude reply MCP handler returns a clear error to the caller when text is missing (files-only replies still allowed), skipping the empty text message. - hooks Bot-API client sendMessage() drops empty/undefined + logs a warning. Regression test locks the sendMessage guard. Fork versions bumped; generator --check byte-exact; suite 319/0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Guards every telegram-* send choke point so an accidental undefined/empty/'undefined' text can never be delivered to a user.
Regression test locks the sendMessage guard. Fork versions bumped; generator --check byte-exact; suite 319/0.
Gate: approved by lodar 2026-07-22 05:05:49 (DIVE-1674).
Generated with Claude Code