From f7d4f9d53c45900d9f83e8aebe840c9ec90b8b6e Mon Sep 17 00:00:00 2001 From: Max Hao Date: Tue, 9 Jun 2026 17:07:18 -0400 Subject: [PATCH] fix: prevent draft emails from being marked as unread --- lib/jmap/client.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/jmap/client.ts b/lib/jmap/client.ts index 501de5bb..4bf02286 100644 --- a/lib/jmap/client.ts +++ b/lib/jmap/client.ts @@ -2175,7 +2175,7 @@ export class JMAPClient implements IJMAPClient { cc: cc?.length ? cc.map(email => ({ email })) : undefined, bcc: bcc?.length ? bcc.map(email => ({ email })) : undefined, subject, - keywords: { "$draft": true }, + keywords: { "$seen": true, "$draft": true }, mailboxIds: { [draftsMailbox.id]: true }, bodyValues: htmlBody ? { "text": { value: body }, "html": { value: htmlBody } } @@ -6259,6 +6259,7 @@ export class JMAPClient implements IJMAPClient { const update: Record = { [`mailboxIds/${draftMailboxId}`]: true, 'keywords/$draft': true, + 'keywords/$seen': true, }; if (sentMailboxId) { update[`mailboxIds/${sentMailboxId}`] = null;