Ignore Drafts folder when scanning (#2454)

* Add failing test for #2369

* Completely ignore Drafts folder

fix #2369

* Also ignore messages that have the Draft flag set but are not in the Drafts folder
This commit is contained in:
Hocuri
2021-06-03 21:14:39 +02:00
committed by GitHub
parent d8ba466c6a
commit bf7f64d50b
7 changed files with 155 additions and 98 deletions

View File

@@ -2742,11 +2742,14 @@ mod tests {
// Check that the ndn would be downloaded:
let headers = mailparse::parse_mail(raw_ndn).unwrap().headers;
assert!(
crate::imap::prefetch_should_download(&t, &headers, ShowEmails::Off)
.await
.unwrap()
);
assert!(crate::imap::prefetch_should_download(
&t,
&headers,
std::iter::empty(),
ShowEmails::Off
)
.await
.unwrap());
dc_receive_imf(&t, raw_ndn, "INBOX", 1, false)
.await