Since message IDs are now static but there's no good way to generate
static thread IDs while syncing an account from newest message first,
we give threads the ID of any message on that thread and, when setting
metadata, look up the local thread ID by first going through the
message table.
Also changed the DeltaProcessor so it doesn’t query for models before sending out `Actions.didPassivelyReceiveCreateDeltas`, and renames it to be more clear it’s about deltas.
Moving to between gmail folders (all, spam, trash) or moving to inbox,
involves changing labels /and/ folders, simultaneously. For this I added
a task to perform both operations, and apply labels first before
attempting to move the folder
Revert "fix(categories): Fix tasks for moving threads in Gmail"
This reverts commit 527de80ad2.
Since our backend now reflects the actual gmail model, a thread actually
has folder and labels. Updating our N1 data model to reflect that would
take too much time right now.
Instead, I updated the task factory to generate both ChangeLabel and
ChangeFolder tasks when moving threads for gmail, by detecting if its
moving to all, trash, or spam, or returning to inbox (if moving
something to inbox, just makes sure we move to all as well)
TODO: there are still inconsistencies because k2 doesn't generate unique
ids across the entire database, which causes 3 labels and 3 folders to
have the same ids. In our code, we expect all categories to have
distinct ids
This reverts commit ee5609bdb0.
Updates to nylas sync worker to support multiple cursors
Convert NylasSyncWorker to es6
Convert NylasSyncWorkerPool to es6
Extract into deltaProcessor
Update names to NylasSyncWorker state
Working on spec fixes
More spec fixes
Delta stream refactor fixes