Wrap the TelegramAdapter import in _send_to_platform() with a try/except ImportError guard, matching the existing Feishu pattern in the same function. When python-telegram-bot is not installed, the import no longer crashes the cron scheduler. Instead, MAX_MESSAGE_LENGTH falls back to a hardcoded 4096. The _send_telegram() function already had its own ImportError guard for the telegram package; this fixes the remaining bare import of TelegramAdapter in the platform-routing function.
52 KiB
52 KiB