huskies: merge 1212 story Sled chat messages show "workspace" instead of the real project name
This commit is contained in:
@@ -411,16 +411,14 @@ pub(crate) fn spawn_gateway_relay(startup_root: &Option<PathBuf>, status: Arc<St
|
||||
.unwrap_or_default();
|
||||
|
||||
if !relay_gateway_url.is_empty() {
|
||||
// Same precedence chain (and same shared helper) as the notification
|
||||
// listener uses (story 1212), so the relay's project name and chat
|
||||
// notifications never drift apart.
|
||||
let relay_project_name = startup_root
|
||||
.as_ref()
|
||||
.and_then(|r| config::ProjectConfig::load(r).ok())
|
||||
.and_then(|c| c.gateway_project)
|
||||
.or_else(|| std::env::var("HUSKIES_GATEWAY_PROJECT").ok())
|
||||
.or_else(|| {
|
||||
startup_root
|
||||
.as_ref()
|
||||
.and_then(|r| r.file_name())
|
||||
.map(|n| n.to_string_lossy().into_owned())
|
||||
.map(|r| {
|
||||
let cfg = config::ProjectConfig::load(r).unwrap_or_default();
|
||||
service::notifications::resolve_project_display_name(&cfg, r)
|
||||
})
|
||||
.unwrap_or_else(|| "project".to_string());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user