fix: case-sensitive flag comparison in AgentMail bot (#35)

This commit is contained in:
threebeats 2026-06-16 06:20:17 -04:00 committed by GitHub
parent 337011fa03
commit 9c2886c9b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -135,7 +135,7 @@ func RunBot(ctx context.Context, c *Client, args []string, in io.Reader, out io.
if len(args) > 3 { if len(args) > 3 {
on = !strings.EqualFold(args[3], "off") && args[3] != "false" && args[3] != "0" on = !strings.EqualFold(args[3], "off") && args[3] != "false" && args[3] != "0"
} }
if args[0] == "flag" { if strings.ToLower(args[0]) == "flag" {
err = c.Flag(ctx, mailbox, uid, on) err = c.Flag(ctx, mailbox, uid, on)
} else { } else {
err = c.MarkSeen(ctx, mailbox, uid, on) err = c.MarkSeen(ctx, mailbox, uid, on)