From d5d6c76a93c6e5f0d83e720d15c2d9c2c8bd9f58 Mon Sep 17 00:00:00 2001 From: nanobot Date: Tue, 28 Jul 2026 14:17:34 +0800 Subject: [PATCH] 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. --- nanobot/channels/telegram/runtime.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nanobot/channels/telegram/runtime.py b/nanobot/channels/telegram/runtime.py index 9e42b2df..4ac83ca7 100644 --- a/nanobot/channels/telegram/runtime.py +++ b/nanobot/channels/telegram/runtime.py @@ -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