Browse Source

imap: remove FLAGS.SILENT from STOREs

Flag updates were not received, because FLAGS.SILENT was used.
memfd
Manos Pitsidianakis 2 years ago
parent
commit
f41a1ffe3a
Signed by: epilys GPG Key ID: 73627C2F690DF710
  1. 10
      melib/src/backends/imap.rs
  2. 1
      melib/src/backends/imap/protocol_parser.rs

10
melib/src/backends/imap.rs

@ -504,7 +504,7 @@ impl MailBackend for ImapType {
for env_hash in env_hashes.rest {
cmd = format!("{},{}", cmd, hash_index_lck[&env_hash].0);
}
format!("{} +FLAGS.SILENT (\\Deleted)", cmd)
format!("{} +FLAGS (\\Deleted)", cmd)
};
conn.send_command(command.as_bytes()).await?;
conn.read_response(&mut response, RequiredResponses::empty())
@ -535,7 +535,7 @@ impl MailBackend for ImapType {
for env_hash in &env_hashes.rest {
cmd = format!("{},{}", cmd, hash_index_lck[env_hash].0);
}
cmd = format!("{} +FLAGS.SILENT (", cmd);
cmd = format!("{} +FLAGS (", cmd);
for (f, v) in flags.iter() {
if !*v {
continue;
@ -579,7 +579,7 @@ impl MailBackend for ImapType {
cmd
};
conn.send_command(command.as_bytes()).await?;
conn.read_response(&mut response, RequiredResponses::STORE_REQUIRED)
conn.read_response(&mut response, RequiredResponses::empty())
.await?;
}
if flags.iter().any(|(_, b)| !*b) {
@ -590,7 +590,7 @@ impl MailBackend for ImapType {
for env_hash in &env_hashes.rest {
cmd = format!("{},{}", cmd, hash_index_lck[env_hash].0);
}
cmd = format!("{} -FLAGS.SILENT (", cmd);
cmd = format!("{} -FLAGS (", cmd);
for (f, v) in flags.iter() {
if *v {
continue;
@ -634,7 +634,7 @@ impl MailBackend for ImapType {
cmd
};
conn.send_command(command.as_bytes()).await?;
conn.read_response(&mut response, RequiredResponses::STORE_REQUIRED)
conn.read_response(&mut response, RequiredResponses::empty())
.await?;
}
Ok(())

1
melib/src/backends/imap/protocol_parser.rs

@ -59,7 +59,6 @@ bitflags! {
const LIST_REQUIRED = Self::LIST.bits;
const LSUB_REQUIRED = Self::LSUB.bits;
const FETCH_REQUIRED = Self::FETCH.bits;
const STORE_REQUIRED = Self::FETCH.bits;
}
}

Loading…
Cancel
Save