From 2ae8d41098d6840700494e391d4aa0f4c8867ffc Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Sun, 15 Jan 2017 17:38:57 -0800 Subject: [PATCH] :art:(send): Don't try to multi-send when only sending to 1 recipient Summary: This will make send for a single recipient faster, and open/link tracking will continue to work as expected Test Plan: manual Reviewers: evan, halla Reviewed By: halla Differential Revision: https://phab.nylas.com/D3702 --- src/K2 | 2 +- src/flux/tasks/send-draft-task.es6 | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/K2 b/src/K2 index 8402a7b47..c2138a36f 160000 --- a/src/K2 +++ b/src/K2 @@ -1 +1 @@ -Subproject commit 8402a7b4728a77b0ba5b2dacbb104363bb728282 +Subproject commit c2138a36f65bec707c834fea8281abae6059dddb diff --git a/src/flux/tasks/send-draft-task.es6 b/src/flux/tasks/send-draft-task.es6 index ba939d62b..9e930f3b5 100644 --- a/src/flux/tasks/send-draft-task.es6 +++ b/src/flux/tasks/send-draft-task.es6 @@ -87,7 +87,8 @@ export default class SendDraftTask extends BaseDraftTask { // Sending individual bodies for too many participants can cause us // to hit the smtp rate limit. - if (this.draft.participants({includeFrom: false, includeBcc: true}).length > 10) { + const participants = this.draft.participants({includeFrom: false, includeBcc: true}) + if (participants.length === 1 || participants.length > 10) { return false; }