fix(telegram): use thread fallback helper in slash-confirm result send - #23669
Closed
AhmetArif0 wants to merge 1 commit into
Closed
fix(telegram): use thread fallback helper in slash-confirm result send#23669AhmetArif0 wants to merge 1 commit into
AhmetArif0 wants to merge 1 commit into
Conversation
PR NousResearch#23458 introduced _send_message_with_thread_fallback() and applied it to all control-style sends (send_update_prompt, send_approval_request, send_model_picker_prompt), but the slash-confirm result message in handle_callback_query still called self._bot.send_message directly. In supergroups with stale message_thread_id on the callback's parent message, this raises "Message thread not found" and silently swallows the result text. Replace with the helper so the same retry-without- thread-id logic applies.
Contributor
|
Merged via PR #24712 (cherry-picked onto current main with your authorship preserved). Thanks for the contribution! |
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
PR #23458 introduced
_send_message_with_thread_fallback()and wired it into all control-style sends (send_update_prompt,send_approval_request,send_model_picker_prompt), but the follow-up result message in thesc:callback branch ofhandle_callback_querystill calledself._bot.send_messagedirectly.In supergroups where the callback's parent message carries a stale
message_thread_id(e.g. a DM reply chain), this raises"Message thread not found"and the result text is silently dropped — the user clicks Approve / Once / Cancel but receives no confirmation message.Change
Replace the bare
self._bot.send_message(**send_kwargs)call at the end of thesc:branch withself._send_message_with_thread_fallback(**send_kwargs), so the existing retry-without-message_thread_idlogic applies here too.1 line changed in
gateway/platforms/telegram.py.Test plan