Skip to content

fix(mailbox): honor uppercase FLAG bot command#34

Open
rissrice2105-agent wants to merge 1 commit into
profullstack:mainfrom
rissrice2105-agent:fix/mailbot-uppercase-flag
Open

fix(mailbox): honor uppercase FLAG bot command#34
rissrice2105-agent wants to merge 1 commit into
profullstack:mainfrom
rissrice2105-agent:fix/mailbot-uppercase-flag

Conversation

@rissrice2105-agent

Copy link
Copy Markdown

Summary

  • normalize the AgentMail bot command once before dispatch
  • use the normalized command when choosing between flag and seen operations
  • add a regression test for uppercase FLAG so it sets Flagged without marking the message Seen

Root cause

RunBot dispatches commands case-insensitively with strings.ToLower(args[0]), but the shared flag/seen case compared the original args[0]. Uppercase FLAG reached the right case, then fell through to MarkSeen because args[0] == "flag" was false.

Closes #33

Tests

  • go test ./internal/mailbox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AgentMail bot uppercase FLAG marks messages seen instead of flagged

1 participant