🎨(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
This commit is contained in:
Juan Tejada 2017-01-15 17:38:57 -08:00
parent 6d403c99cf
commit 2ae8d41098
2 changed files with 3 additions and 2 deletions

2
src/K2

@ -1 +1 @@
Subproject commit 8402a7b4728a77b0ba5b2dacbb104363bb728282
Subproject commit c2138a36f65bec707c834fea8281abae6059dddb

View file

@ -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;
}