fix(handoff): normalize identity in sendHandoffMail (#780)
The handoff mail bead was created with un-normalized assignee (e.g., gastown/crew/holden) but mailbox queries use normalized identity (gastown/holden), causing self-mail to be invisible to the inbox. Export addressToIdentity as AddressToIdentity and call it in sendHandoffMail() to normalize the agent identity before storing, matching the normalization performed in Router.sendToSingle(). Fix handoff mail delivery (hq-snp8)
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/steveyegge/gastown/internal/config"
|
||||
"github.com/steveyegge/gastown/internal/constants"
|
||||
"github.com/steveyegge/gastown/internal/events"
|
||||
"github.com/steveyegge/gastown/internal/mail"
|
||||
"github.com/steveyegge/gastown/internal/session"
|
||||
"github.com/steveyegge/gastown/internal/style"
|
||||
"github.com/steveyegge/gastown/internal/tmux"
|
||||
@@ -577,6 +578,9 @@ func sendHandoffMail(subject, message string) (string, error) {
|
||||
return "", fmt.Errorf("detecting agent identity: %w", err)
|
||||
}
|
||||
|
||||
// Normalize identity to match mailbox query format
|
||||
agentID = mail.AddressToIdentity(agentID)
|
||||
|
||||
// Detect town root for beads location
|
||||
townRoot := detectTownRootFromCwd()
|
||||
if townRoot == "" {
|
||||
|
||||
Reference in New Issue
Block a user