fix: raise error when Telegram bot not running instead of silently dropping messages

When the outbound dispatcher processes recovery notifications before the
Telegram bot is fully started, the send() method silently returned, causing
the notification to be lost. Now it raises RuntimeError so _send_with_retry
will retry until the bot is ready.
This commit is contained in:
nanobot
2026-07-28 14:17:34 +08:00
parent 79a0fd8ed0
commit d5d6c76a93
+1 -1
View File
@@ -729,7 +729,7 @@ class TelegramChannel(BaseChannel):
"""Send a message through Telegram."""
if not self._app:
self.logger.warning("bot not running")
return
raise RuntimeError("Telegram bot is not running")
progress_event = msg.event if isinstance(msg.event, ProgressEvent) else None