mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 10:12:00 +08:00
a23813a11c
Summary: This swaps out our generic IMAP threading mechanism to use the threading headers on the message instead of the prior way of grouping by subject and then differentiating based on participants, as that design was somewhat driven by what we could accomplish easily given legacy data schema decisions and has serious caveats, such as different threads between the same people with the same subject being misthreaded together. With K2, we have free reign to change the data format, so we can do it right. The algorithm is super simple: - Define "references" as the union of the Message-Id, In-Reply-To, and References headers on a message, filtered for valid RFC2822 Message-IDs - On message sync, if any element of the new message's references matches any element of an existing message's references, thread them together In order to accomplish this, we need to store References in a way that allows each element to be indexed for fast lookup. That meant either using the sqlite JSON1 extension + expression-based indices, or creating a new table. I chose the latter as a time-tested and simple solution, since we don't need the flexibility of JSON here. Test Plan: manual - unit tests coming Reviewers: khamidou, evan, juan Reviewed By: evan, juan Differential Revision: https://phab.nylas.com/D3651 |
||
---|---|---|
.. | ||
src | ||
index.js | ||
package.json |