mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 10:12:00 +08:00
💌 A beautiful, fast and fully open source mail client for Mac, Windows and Linux.
359e32282f
Summary: We've been syncing drafts messages but not the drafts flag in K2, making them appear in Edgehill as regular old messages. This commit makes K2 sync the drafts flag, and also correctly label folders called "Drafts" with the 'drafts' role. Because 2-way syncing of drafts is very complex and error-prone since you need to add new drafts and delete the old ones on every update, and we reaally don't want to do things like create multiplying draft copies or accidentally lose a draft someone started composing elsewhere, we simply exclude messages marked as drafts from being serialized to Edgehill through the delta stream for now. This removes the confusing behaviour and also sets a better stage for completing drafts sync later. Eventually we will also want to add functionality to allow users to select their drafts folder, but for now this code does the right thing in many more cases. While investigating this behaviour, I also discovered a bug we've never seen before where Gmail isn't applying the \Draft flag to draft messages, no matter which folder we fetch them from. :-/ This is very unfortunate and there's no way for us to work around it other than to fetch messages in the Drafts folder and manually apply the flag locally, since "drafts" is not a label in Gmail, only another IMAP folder. Brandon Long from the Gmail team says that this is because they've had problems with clients which sync drafts, so the Gmail web client and mobile apps do not set the \Draft flag on drafts. (I don't get how this solves their problem, but okay.) Let's solve the issue on Gmail if it comes up by user demand—should be relatively straightforward to implement, but it adds sync work & complexity. Fixes T7593 Test Plan: manual Reviewers: halla, juan Reviewed By: juan Maniphest Tasks: T7593 Differential Revision: https://phab.nylas.com/D3749 |
||
---|---|---|
.ebextensions | ||
arclib | ||
packages | ||
scripts | ||
.arcconfig | ||
.arclint | ||
.babelrc | ||
.dockerignore | ||
.eslintrc | ||
.gitignore | ||
.tern-project | ||
Dockerfile | ||
lerna.json | ||
package.json | ||
pm2-debug-cloud-api.yml | ||
pm2-dev.yml | ||
pm2-prod-api.yml | ||
pm2-prod-workers.yml | ||
README.md | ||
test_accounts.txt |
K2 - Local Sync Engine & Cloud Services for Nylas Mail
This is a collection of all sync and cloud components required to run N1.
- Cloud API: The cloud-based auth and metadata APIs for N1
- Cloud Core: Shared code used in all remote cloud services
- Cloud Workers: Cloud workers for services like send later
- Isomorphic Core: Shared code across local client and cloud servers
- Local Sync: The local mailsync engine integreated in Nylas Mail
See /packages
for the separate pieces. Each folder in /packages
is
designed to be its own stand-alone repositoriy. They are all bundled here
for the ease of source control management.
Initial Setup for All Local & Cloud Services:
New Computer (Mac):
- Install Homebrew
- Install NVM
brew install nvm
- Install Node 6 via NVM:
nvm install 6
- Install Redis locally
brew install redis
New Computer (Linux - Debian/Ubuntu):
- Install Node 6+ via NodeSource (trusted):
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
- Install Redis locally
sudo apt-get install -y redis-server redis-tools
benefit of letting us use subdomains.