fix(telegram): skip message_thread_id for General topic messages#848
Merged
steipete merged 1 commit intoopenclaw:mainfrom Jan 16, 2026
Merged
Conversation
773476e to
3821d47
Compare
erik-agens
approved these changes
Jan 13, 2026
Contributor
erik-agens
left a comment
There was a problem hiding this comment.
This looks good to me and solves an issue that takes a bit of time to debug.
👍
Contributor
Author
|
Update after upstream refactor The original fix was lost during the
Force-pushed to align with current upstream main. |
abfa3a7 to
fec4ad7
Compare
ad86b93 to
9b44cef
Compare
Contributor
Author
|
Correction: My previous comment was incorrect. The actual behavior:
Two helper functions:
|
Telegram General topic (id=1) has inconsistent API behavior: - sendMessage: rejects explicit message_thread_id=1 - sendChatAction: requires message_thread_id=1 for typing to show Split into two helper functions: - buildTelegramThreadParams: excludes General topic for messages - buildTypingThreadParams: includes General topic for typing
9b44cef to
6146acb
Compare
steipete
added a commit
that referenced
this pull request
Jan 16, 2026
steipete
added a commit
that referenced
this pull request
Jan 16, 2026
10 tasks
garnetlyx
pushed a commit
to garnetlyx/openclaw
that referenced
this pull request
Feb 8, 2026
- DMs should not have thread_id (private chats don't support threads) - Restore PR openclaw#848 fix: skip thread_id=1 for General forum topics - Fixes regression from commit 19b8416 that broke sub-agent announce in DMs - Closes openclaw#10926
Takhoffman
pushed a commit
to garnetlyx/openclaw
that referenced
this pull request
Feb 15, 2026
- DMs should not have thread_id (private chats don't support threads) - Restore PR openclaw#848 fix: skip thread_id=1 for General forum topics - Fixes regression from commit 19b8416 that broke sub-agent announce in DMs - Closes openclaw#10926
jamie-dit
pushed a commit
to jamie-dit/zulip-claw
that referenced
this pull request
Feb 20, 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.
Problem
In Telegram forum groups, the General topic uses
thread_id=1. The Telegram Bot API has inconsistent behavior for this topic:sendMessagewithmessage_thread_id=1→ ❌ Rejected ("message thread not found")sendChatAction(typing) withoutmessage_thread_id→ ❌ No typing shownAfter the channels rename refactor, Clawdbot started explicitly sending
message_thread_id=1for messages in the General topic, triggering this error:Investigation
We tested the Telegram Bot API behavior for the General topic:
sendMessagesendChatActionThis is an inconsistency in the Telegram Bot API — it requires opposite handling for messages vs typing indicators.
Solution
Refactored thread handling into two distinct functions to work around the API inconsistency:
buildTelegramThreadParams()For sending messages. Omits
message_thread_idfor General topic (1) — Telegram routes automatically.buildTypingActionParams()For typing indicators (
sendChatAction). Includesmessage_thread_id=1— required by the API for typing to appear.Testing
Tested in a Telegram forum group: