mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-23 08:46:07 +08:00
840ebebecf
Summary: Since buildMime isn't always used explictly for the send operation (we mostly use it for stuffing the sent folder, which is a separate operation), move it to MessageUtils. Additionally, add an includeBcc option. We don't want the BCC header to be visible on outbound messages, but it needs to be present on the version that is saved to the sent folder. When we weren't including the BCC header in the sent folder version, we were getting an id mismatch between our optimistic message and the message that gets processed by the sync loop (because we include the bcc participants when computing the id hash). When the sent message was a reply, the optimistic message included the threadId, and this had the side effect of leaving both versions of the sent message in the thread. Since the optimistic message never receieved it's imap UID, any action performed on the thread would fail with the missing UID error as seen in T7941. Adding this BCC header will allow us to compute the proper id hash and reconcile the synced message with the optimistic message. Test Plan: manual Reviewers: evan, mark, juan Reviewed By: juan Differential Revision: https://phab.nylas.com/D4365 |
||
---|---|---|
.. | ||
images | ||
spec | ||
src | ||
stylesheets | ||
main.es6 | ||
package.json | ||
README.md |
Client Sync
This is the mail sync engine that runs within the Nylas Mail client
It is symlinked in as an internal_package
of Nylas Mail via the postinstall
script of the root repo.
Important Usage Notes:
Since this is symlinked in as an internal_package
of Nylas Mail, there are a
handulf of considerations when developing in client-sync. Some common gotchas:
- You MAY use
NylasEnv
,NylasExports
and other injected libraries in the Nylas Mail client environment. - You MAY use any 3rd party library declared in
client-app/package.json
. Since this gets added as a plugin of the Nylas Mail client, you'll have access to all libraries. This works because theclient-app/node_modules
was added to the global require paths. That lets us access client-app plugins without being a file directory decendent of client-app (client-sync is now a sibling of client-app) - You may NOT add "dependencies" to the
client-sync/package.json
. If you need a 3rd party library, add it to the mainclient-app/package.json
. All Nylas Mail plugins (those inside ofinternal_packages
), may no longer declare their own dependencies. - You should be aggressive at moving generic mail methods to
isomorphic-core
. We may eventually want to make large chunks of client-sync work in a cloud environment as well.