Skip to content

fix(telegram): use thread fallback helper in slash-confirm result send - #23669

Closed
AhmetArif0 wants to merge 1 commit into
NousResearch:mainfrom
AhmetArif0:fix/telegram-slash-confirm-thread-fallback
Closed

fix(telegram): use thread fallback helper in slash-confirm result send#23669
AhmetArif0 wants to merge 1 commit into
NousResearch:mainfrom
AhmetArif0:fix/telegram-slash-confirm-thread-fallback

Conversation

@AhmetArif0

Copy link
Copy Markdown
Contributor

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 the sc: callback branch of handle_callback_query still called self._bot.send_message directly.

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 the sc: branch with self._send_message_with_thread_fallback(**send_kwargs), so the existing retry-without-message_thread_id logic applies here too.

1 line changed in gateway/platforms/telegram.py.

Test plan

  • Trigger a slash-confirm prompt inside a Telegram supergroup topic thread
  • Click an approval button — confirm the result message is delivered
  • Verify no regression on regular (non-thread) chats

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.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery platform/telegram Telegram bot adapter labels May 11, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #24712 (cherry-picked onto current main with your authorship preserved). Thanks for the contribution!

@teknium1 teknium1 closed this May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists platform/telegram Telegram bot adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants