mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-11 02:30:21 +08:00
💌 A beautiful, fast and fully open source mail client for Mac, Windows and Linux.
00aa499365
Summary: After https://github.com/nylas/nylas-mail-all/commit/008cb4c, the shape of account.connectionSettings changed, which means that ids for accounts will also change, given that they are based on the connection settings (see Account.hash()). This is fine in most cases, except for accounts that were running on a version of Nylas Mail before 008cb4c, then upgraded to a version after 008cb4c, and then re-authed their account. In this scenario, re-authing the account will create a second account with a different `id` but with the same email address, along with an extra sequelize database, and will start a second SyncWorker for the same account. App-side, the `AccountStore` will correctly overwrite the first account, so users would correctly see just 1 account in the sidebar. However, given that 2 SyncWorkers would be running for the same account, message ids would collide in edgehill.db and this would cause threads to disappear from the ui as if they were being deleted. To fix this, we need to do 2 things: - Upon app start, we remove any duplicate accounts that might have been created due to this bug before starting any sync workers - If we detect that we are going to create a duplicate account upon auth success, we delete the old account first. This will effectively cause sync to restart for the account. Test Plan: Verified problem: Checked out a commit before 008cb4c, authed an account, checked out master, re-authed account, verified that duplicate accounts are created. Then test 2 scenarios: - With duplicate accounts present, checked out this commit, verified that duplicate account would be removed and sync would function normally. - With an account authed on a build before 008cb4c, checked out this commit, re-authed the account, and verified that duplicate account wouldn't be created Reviewers: mark, halla, khamidou, spang Reviewed By: spang Subscribers: tomasz Differential Revision: https://phab.nylas.com/D4425 |
||
---|---|---|
.ebextensions | ||
arclib | ||
packages | ||
scripts | ||
.arcconfig | ||
.arclint | ||
.babelrc | ||
.coffeelint.json | ||
.dockerignore | ||
.ebignore | ||
.eslintrc | ||
.gitignore | ||
.travis.yml | ||
appveyor.yml | ||
deploy-it | ||
Dockerfile | ||
lerna.json | ||
package.json | ||
README.md |
Nylas Mail
This is a collection of all components required to run Nylas Mail.
- Isomorphic Core: Shared code across local client and cloud servers
- Client App: The main Electron app for Nylas Mail mirrored to open source repo.
- Client Sync: The local mailsync engine integreated in Nylas Mail
- Client Private Plugins: Private Nylas Mail plugins (like SFDC)
- 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
See /packages
for the separate pieces. Each folder in /packages
is
designed to be its own stand-alone repository. They are all bundled here
for the ease of source control management.
Initial Setup for All Local & Cloud Services:
New Computer (Mac):
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.
Running Nylas Mail
npm install
(Only on fresh install and new packages)npm run start-client
: Starts Electron app clientnpm run start-cloud
: Starts cloud API locally