-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Problem
mc_thread_read() returns all messages in a thread but doesn't distinguish between sent messages and drafts. When iterating on email drafts, there's no way to pull the current draft content from a thread without dropping down to raw gmailr and decoding base64 manually.
Proposed Solution
Add a drafts parameter to mc_thread_read():
mc_thread_read("thread_id", drafts = TRUE)drafts = FALSE(default): current behavior, no changedrafts = TRUE: include draft messages in the output with astatuscolumn ("sent"/"draft")
Implementation notes
- Gmail API returns draft metadata via
gm_drafts()— cross-reference message IDs in the thread with draft message IDs to flag status - Existing tests need review to ensure the new column doesn't break downstream expectations when
drafts = FALSE - Branch + PR workflow
Why not a standalone mc_draft_read()?
Draft content is most useful in thread context (seeing what you're replying to). A param on the existing function keeps the API surface small and avoids needing to know draft IDs separately.
Relates to NewGraphEnvironment/compost
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels