Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions agent-sdk-client/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Receives Telegram webhook, writes to SQS, returns 200 immediately.
"""
import asyncio
import json
import logging
from typing import Any
Expand Down Expand Up @@ -128,11 +129,13 @@ def _handle_local_command(bot: Bot, message, config: Config, cmd: str) -> bool:
text = config.unknown_command_message()

try:
bot.send_message(
chat_id=message.chat_id,
text=text,
message_thread_id=message.message_thread_id,
reply_to_message_id=message.message_id,
asyncio.run(
bot.send_message(
chat_id=message.chat_id,
text=text,
message_thread_id=message.message_thread_id,
reply_to_message_id=message.message_id,
)
)
except Exception:
logger.warning("Failed to send local command response", exc_info=True)
Expand Down