fix: prevent draft emails from being marked as unread
This commit is contained in:
+2
-1
@@ -2175,7 +2175,7 @@ export class JMAPClient implements IJMAPClient {
|
|||||||
cc: cc?.length ? cc.map(email => ({ email })) : undefined,
|
cc: cc?.length ? cc.map(email => ({ email })) : undefined,
|
||||||
bcc: bcc?.length ? bcc.map(email => ({ email })) : undefined,
|
bcc: bcc?.length ? bcc.map(email => ({ email })) : undefined,
|
||||||
subject,
|
subject,
|
||||||
keywords: { "$draft": true },
|
keywords: { "$seen": true, "$draft": true },
|
||||||
mailboxIds: { [draftsMailbox.id]: true },
|
mailboxIds: { [draftsMailbox.id]: true },
|
||||||
bodyValues: htmlBody
|
bodyValues: htmlBody
|
||||||
? { "text": { value: body }, "html": { value: htmlBody } }
|
? { "text": { value: body }, "html": { value: htmlBody } }
|
||||||
@@ -6259,6 +6259,7 @@ export class JMAPClient implements IJMAPClient {
|
|||||||
const update: Record<string, unknown> = {
|
const update: Record<string, unknown> = {
|
||||||
[`mailboxIds/${draftMailboxId}`]: true,
|
[`mailboxIds/${draftMailboxId}`]: true,
|
||||||
'keywords/$draft': true,
|
'keywords/$draft': true,
|
||||||
|
'keywords/$seen': true,
|
||||||
};
|
};
|
||||||
if (sentMailboxId) {
|
if (sentMailboxId) {
|
||||||
update[`mailboxIds/${sentMailboxId}`] = null;
|
update[`mailboxIds/${sentMailboxId}`] = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user