fix(telegram): drop message_thread_id=1 for DM chats#12758
Open
yukihamada wants to merge 1 commit intoopenclaw:mainfrom
Open
fix(telegram): drop message_thread_id=1 for DM chats#12758yukihamada wants to merge 1 commit intoopenclaw:mainfrom
yukihamada wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Telegram rejects sendMessage with message_thread_id=1 in DM chats
("message thread not found"). The condition in buildTelegramThreadParams
only dropped thread_id=1 for forum scope, but DMs need the same treatment.
Change scope check from === "forum" to !== "none" so both forum and DM
scopes correctly omit the thread parameter.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
SutanuNandigrami
pushed a commit
to SutanuNandigrami/openclaw
that referenced
this pull request
Feb 9, 2026
bfc1ccb to
f92900f
Compare
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.
Summary
Fixes #12625 — cron job announcements fail in Telegram DMs with "message thread not found" error.
buildTelegramThreadParams()now dropsmessage_thread_id=1for DM chats (not just forum groups)=== "forum"to!== "none"so both forum and DM scopes correctly omit the thread parameterscope: "none"Root Cause
Commit
19b8416a8introduced a regression wheremessage_thread_id=1is sent for DM chats. Telegram's API rejects this for DMs with "message thread not found". The fix inbuildTelegramThreadParamsonly stripped thread_id=1 forscope === "forum", missing the"dm"case.Test plan
pnpm test src/telegram/bot/helpers.test.ts— 25/25 tests passpnpm build— type check passespnpm check— no lint/format issues in changed files🤖 Generated with Claude Code