INNER CODE UNIT · Python

file_roots

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

    def file_roots(self, paths: DuctorPaths) -> list[Path] | None:
        """Allowed root directories for ``<file:...>`` tag sends."""
        return resolve_allowed_roots(self._config.file_access, paths.workspace)

    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.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…