Skip to main content

deliver_gotify_message

Function deliver_gotify_message 

Source
pub(crate) fn deliver_gotify_message(
    workspace: &Arc<Workspace>,
    project: &str,
    team_role: Option<&str>,
    notification: GotifyNotification,
)
Expand description

Deliver a matched Gotify notification into project as a plain user turn AND echo it into the target’s chat as a notification block. When team_role names a running team worker, deliver straight to it; otherwise deliver to the project lead - echo + dispatch a Command::Prompt if it’s running, else park it for the target’s slot and dispatch Command::SpawnProject (SessionTask drains + echoes on Connected via deliver_parked_gotify). A team-worker subscription with NO live entry falls through to lead delivery (spawning the project brings the team up); a live-but-not-yet-connected worker parks for its own label instead. A project no longer in forge.toml is logged and skipped.