Mailspring/packages/local-private
Evan Morikawa 4237cf2bd5 refactor(send): split delivery from sent folder stuffing
Summary:
refactor multi-send

This diff started off by fixing sending with attachments.

The issue is that our `FileUploadStore` listened for
`Actions.sendDraftSuccess` as its signal to remove the files from the
.nylas temp directory. Unfortunately, the old MultiSend tasks, after
delivery of the message, would try and put the base message in the sent
folder. Since we already deleted the file from our local temp dir,
creating the base message for the sent folder would fail.

This exposed a much bigger issue which is that we don't consistently
distinguish between "delivery" of a message and any post-processing we do
(like filling the sent folder). This was leading to a variety of other
subtle issues.

For example, N1 assumes that if the SendMessage task fails, then we pop
the draft back up and ask the user to try again. Unfortunately, since we
were combining "delivery" and "post processing" it was possible for the
message to actually deliver, but fail when stuffing the sent folder, or
fail due to some other random bug. This would cause the user to send the
message twice.

To help us ensure we never "deliver" twice and handle errors more
intuitively, I separated out the two concepts.

Now there are "send" set of tasks and endpoints, and a
"EnsureMessageInSentFolder" set of tasks and endpoint (the latter used to
be ambiguously known as ReconcileMultiSend, whatever that meant)

The logic for send hasn't changed. This is mostly a renaming and moving
files around.

Test Plan: manual :(

Reviewers: jackie, juan, halla

Reviewed By: juan, halla

Differential Revision: https://phab.nylas.com/D3577
2017-01-04 15:41:35 -08:00
..
docs [local-private] move old edgehill src/pro into packages/local-private 2016-12-12 10:09:58 -05:00
encrypted_certificates [local-private] move old edgehill src/pro into packages/local-private 2016-12-12 10:09:58 -05:00
packages refactor(send): split delivery from sent folder stuffing 2017-01-04 15:41:35 -08:00
src/error-logger-extensions [local-private] move old edgehill src/pro into packages/local-private 2016-12-12 10:09:58 -05:00
README.md [local-private] move old edgehill src/pro into packages/local-private 2016-12-12 10:09:58 -05:00

Nylas Mail

This repo contains proprietary Nylas plugins and other extensions to N1

It is included as a submodule of the open source N1 repo at pro/nylas

From the root of N1, run script/grunt add-nylas-build-resources to manually copy the files from this repo into the appropriate places within N1.

That script is run as part of the N1 build task. Machines that have access this repo will automatically include the proprietary plugins.