You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(gmail): add --thread-id to drafts create/update for parity with send
`gmail send` accepts --thread-id ("uses latest message for headers") but
`gmail drafts create`/`update` only accepted --reply-to-message-id, so there
was no thread-aware reply path when composing a draft. Callers who knew the
thread (not the latest message id) had nowhere to put it; passing a thread id
into --reply-to-message-id silently mis-threads — the draft lands in the thread
via subject fallback but In-Reply-To/References never anchor to the parent's
RFC822 Message-Id, and there's no error.
Wire --thread-id into both draft commands, reusing the existing
prepareComposeReply/fetchReplyInfo thread path (selects the latest thread
message for reply headers):
- Mutually exclusive with --reply-to-message-id (matches `send`).
- --quote now accepts a thread target too.
- On update, a caller-provided --thread-id overrides the draft's existing
thread; the existing-draft thread fallback is preserved when omitted.
- dry-run/JSON gains a thread_id field.
Tests: create resolves to the thread's latest message and stamps threadId +
In-Reply-To/References; mutual-exclusion guard; update override. Regenerated
command docs.
Live-verified (redacted): `gog gmail drafts create --thread-id <T>` produced a
draft whose In-Reply-To/References equal the thread's latest message Message-Id
and whose threadId == <T> (scratch draft created, verified, deleted).
Closes#673.
* docs: add changelog for Gmail draft thread IDs
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@
4
4
5
5
### Added
6
6
7
+
- Gmail: add `--thread-id` to `gmail drafts create` and `gmail drafts update` so drafts can reply within a thread using the latest message headers. (#673, #674) — thanks @chrischall.
|`--reply-to-message-id`|`string`|| Reply to Gmail message ID (sets In-Reply-To/References and thread) |
46
46
|`--results-only`|`bool`|| In JSON mode, emit only the primary result (drops envelope fields like nextPageToken) |
47
47
|`--select`<br>`--pick`<br>`--project`|`string`|| In JSON mode, select comma-separated fields (best-effort; supports dot paths). Desire path: use --fields for most commands. |
48
48
|`--subject`|`string`|| Subject (required) |
49
+
|`--thread-id`|`string`|| Reply within a Gmail thread (uses latest message for headers) |
|`--results-only`|`bool`|| In JSON mode, emit only the primary result (drops envelope fields like nextPageToken) |
47
47
|`--select`<br>`--pick`<br>`--project`|`string`|| In JSON mode, select comma-separated fields (best-effort; supports dot paths). Desire path: use --fields for most commands. |
48
48
|`--subject`|`string`|| Subject (required) |
49
+
|`--thread-id`|`string`|| Reply within a Gmail thread (uses latest message for headers); overrides the draft's existing thread |
49
50
|`--to`|`*string`|| Recipients (comma-separated; omit to keep existing) |
0 commit comments