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-31 15:36:51 +08:00
parent 9240000e75
commit 6b7f3889ea
+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