INNER CODE UNIT · Python
notify_startup
PleasePrompto/ductor · ductor_bot/messenger/telegram/app.py:321
async def notify_startup(self, text: str) -> None:
"""Route startup-lifecycle notifications (#64).
Fallback policy:
* ``startup_targets`` empty (default) -> broadcast via ``notify_all``.
* ``startup_targets`` non-empty but every entry disabled -> explicit
silence (no fallback). This is how users opt out of lifecycle
notifications without losing upgrade routing.
Per-target failures are swallowed at warning level so a single bad
target does not mask the rest.
"""
configured = self._config.notifications.startup_targets
if not configured:
await self._notification_service.notify_all(text)
return
targets = [t for t in configured if t.enabled and t.chat_id is not None]
for target in targets: