mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 18:32:20 +08:00
[local-sync] Still download messages when they have no body
There are plenty of valid use cases for sending subject-only emails, and we also want to still download the headers and create message objects if e.g. the email consists of only an event invitation or an attachment.
This commit is contained in:
parent
3eb450e22c
commit
d36ae8db3c
1 changed files with 1 additions and 4 deletions
|
@ -204,7 +204,7 @@ class FetchMessagesInFolder extends SyncOperation {
|
|||
// attachment metadata is extracted later---ignore for now
|
||||
}
|
||||
|
||||
if (desired.length === 0) {
|
||||
if (desired.length === 0 && available.length !== 0) {
|
||||
this._logger.warn({
|
||||
available_options: available.join(', '),
|
||||
}, `FetchMessagesInFolder: Could not find good part`)
|
||||
|
@ -220,9 +220,6 @@ class FetchMessagesInFolder extends SyncOperation {
|
|||
|
||||
yield this._box.fetchEach(rangeQuery, {struct: true}, ({attributes}) => {
|
||||
const desiredParts = this._getDesiredMIMEParts(attributes.struct);
|
||||
if (desiredParts.length === 0) {
|
||||
return;
|
||||
}
|
||||
const key = JSON.stringify(desiredParts);
|
||||
uidsByPart[key] = uidsByPart[key] || [];
|
||||
uidsByPart[key].push(attributes.uid);
|
||||
|
|
Loading…
Reference in a new issue