fix(telegram): resume typing indicator after inline approval click (#27853)
The text /approve and /deny paths in gateway/run.py call resume_typing_for_chat() after resolve_gateway_approval() succeeds, but the Telegram inline-button (ea:*) callback in _handle_callback_query did not. Typing is paused when the approval is sent (gateway/run.py:15658), so without a matching resume the typing indicator stayed gone for the remainder of a long-running turn after a button click. Symmetry-match the text path: after a successful resolve, call self.resume_typing_for_chat(str(query_chat_id)). Guarded by count > 0 to match /approve's "if not count" early-return — if nothing was actually resolved, the agent thread was never unblocked, so typing should remain paused. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2814,6 +2814,15 @@ class TelegramAdapter(BasePlatformAdapter):
|
||||
)
|
||||
except Exception as exc:
|
||||
logger.error("Failed to resolve gateway approval from Telegram button: %s", exc)
|
||||
count = 0
|
||||
|
||||
# Resume the typing indicator — paused when the approval was
|
||||
# sent (gateway/run.py). The text /approve and /deny paths
|
||||
# call resume_typing_for_chat here too; without it, typing
|
||||
# stays paused for the rest of the turn after an inline
|
||||
# button click.
|
||||
if count and query_chat_id is not None:
|
||||
self.resume_typing_for_chat(str(query_chat_id))
|
||||
return
|
||||
|
||||
# --- Slash-confirm callbacks (sc:choice:confirm_id) ---
|
||||
|
||||
Reference in New Issue
Block a user