feat: expose CC and BCC recipients in message API#242
Conversation
The message_recipients table already stores cc and bcc recipient types from Gmail sync (215K CC rows, 4.5K BCC rows), but the API only returned "to" recipients. This adds cc and bcc fields to MessageSummary and populates them via the existing batchGetRecipients and getRecipients helpers. Also refactors ListMessages to use batchPopulate (like SearchMessages already does) to avoid duplicating the batch-loading logic. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
Cover both store layer (GetMessage, ListMessages populate CC/BCC from message_recipients) and API handler layer (CC/BCC present in JSON when populated, omitted via omitempty when empty). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Address review findings: ListMessages test now exercises BCC path, and CC assertions check actual email values (order-insensitive) instead of only slice length. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sort + compare exact slices instead of set-membership checks, which would not catch duplicate-address regressions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
|
Thanks Wes!
…On Tue, Apr 7, 2026 at 5:33 AM Wes McKinney ***@***.***> wrote:
Merged #242 <#242> into main.
—
Reply to this email directly, view it on GitHub
<#242 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4PK6R24XX4SIKSYQHL7L34UTYRVAVCNFSM6AAAAACXL3ZIDKVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMRUGI2TMNRXHEYDAOI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Summary
message_recipientstable already storesccandbccrecipient types from Gmail sync (215K CC rows, 4.5K BCC rows in production), but the API only returnedtorecipientsccandbccfields toMessageSummary(omitted from JSON when empty)batchGetRecipients/getRecipientshelpers for both list and detail endpointsListMessagesto usebatchPopulate(likeSearchMessagesalready does) to avoid duplicating batch-loading logicTest plan
go test ./internal/store/... ./internal/api/...)/api/v1/messageslist response for messages with CC recipients/api/v1/messages/{id}detail response🤖 Generated with Claude Code