fix(gmail): preserve Cc recipients regardless of header casing - #923
fix(gmail): preserve Cc recipients regardless of header casing#923ZIFeIYUuuuuuu wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: d907083 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
9d85859 to
d907083
Compare
|
/gemini review |
|
This PR has been inactive for 72 hours. Closing to keep the queue clean. |
|
This PR was closed because it has been stalled for 72 hours. Feel free to magically reopen it if you want to continue working on it! |
Fix Gmail +reply-all dropping Cc recipients when header casing differs
Problem
Gmail header names are case-insensitive, but
+reply-allonly recognized the exact spellingCc. Messages returned withCC,cc, or another casing were parsed without any Cc recipients, so the reply omitted people who were copied on the original message.Minimal reproduction:
{ "name": "CC", "value": "alice@example.com" }._and leavesParsedMessageHeaders.ccempty.Root cause
parse_message_headersused a case-sensitive string match for"Cc". RFC 5322 header field names are case-insensitive, and Gmail can return equivalent casing variants.Changes
eq_ignore_ascii_case("Cc")while preserving existing address-list concatenation and formatting.CCandccheaders and asserting that both recipients are retained.Validation
cargo test -p google-workspace-cli helpers::gmail::tests -- --nocapture(113 passed)cargo test -p google-workspace-cli helpers::gmail::tests::test_parse_message_headers_preserves_cc_regardless_of_header_case -- --exact --nocapture(1 passed)cargo fmt --all -- --check(passed)cargo clippy -p google-workspace-cli -- -D warnings -A clippy::collapsible-match(passed; the allow is for an existing unrelated warning inhelpers/script.rs)git diff --check(passed)Other header handling and normal truncation/error behavior are unchanged. This closes #911.