fix(mail): add crew worker detection in detectSender()
detectSender() only detected polecats, not crew workers. Crew workers like Emma at /Users/stevey/gt/beads/crew/emma were incorrectly defaulting to mayor/ instead of getting their proper address. Added /crew/ directory pattern matching parallel to the existing /polecats/ detection, extracting rig/crewName address format. Fixes: gt-70b3 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -468,6 +468,17 @@ func detectSender() string {
|
||||
}
|
||||
}
|
||||
|
||||
// If in a rig's crew directory, extract address
|
||||
if strings.Contains(cwd, "/crew/") {
|
||||
parts := strings.Split(cwd, "/crew/")
|
||||
if len(parts) >= 2 {
|
||||
rigPath := parts[0]
|
||||
crewName := strings.Split(parts[1], "/")[0]
|
||||
rigName := filepath.Base(rigPath)
|
||||
return fmt.Sprintf("%s/%s", rigName, crewName)
|
||||
}
|
||||
}
|
||||
|
||||
// Default to mayor
|
||||
return "mayor/"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user