fix(telegram): graceful fallback when send fails with 'Message thread not found' - #3218
Closed
ygd58 wants to merge 1 commit into
Closed
fix(telegram): graceful fallback when send fails with 'Message thread not found'#3218ygd58 wants to merge 1 commit into
ygd58 wants to merge 1 commit into
Conversation
…n thread not found
Contributor
Author
|
The test failure appears to be a pre-existing CI issue unrelated to this PR's changes to gateway/platforms/telegram.py. No telegram-specific tests exist in the test suite. |
4 tasks
Contributor
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.
Fixes #3206
Problem
In non-forum Telegram DMs, reply chains set message_thread_id which gets passed to send_message(), causing "Message thread not found" errors, 3-retry loops, and 1000+ log errors per session.
Fix — Layer 2 (send-level fallback)
When send_message() fails with "Message thread not found", clear effective_thread_id and retry immediately without it. This is defense-in-depth on top of the source-level fix in #3207.
Note: upstream already handles the source-level fix (Layer 1) via _get_dm_topic_info(). This PR adds the send-level fallback (Layer 2) to handle any thread_id that slips through.