INNER CODE UNIT · Python

broadcast

PleasePrompto/ductor · ductor_bot/messenger/telegram/app.py:316

    async def broadcast(self, text: str, opts: SendRichOpts | None = None) -> None:
        """Send a message to all allowed users."""
        for uid in self._config.allowed_user_ids:
            await send_rich(self._bot, uid, text, opts)

    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

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…