aboutsummaryrefslogtreecommitdiff
path: root/src/imap/command
diff options
context:
space:
mode:
Diffstat (limited to 'src/imap/command')
-rw-r--r--src/imap/command/authenticated.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/imap/command/authenticated.rs b/src/imap/command/authenticated.rs
index 3fd132f..c5f2d00 100644
--- a/src/imap/command/authenticated.rs
+++ b/src/imap/command/authenticated.rs
@@ -235,11 +235,19 @@ impl<'a> AuthenticatedContext<'a> {
.to_string()
.try_into()
.map_err(|_| anyhow!("invalid mailbox name"))?;
- let mut items = vec![FlagNameAttribute::try_from(Atom::unvalidated(
+ let mut items = vec![FlagNameAttribute::from(Atom::unvalidated(
"Subscribed",
- ))?];
+ ))];
if !*is_real {
items.push(FlagNameAttribute::Noselect);
+ } else {
+ match *mb {
+ "Drafts" => items.push(Atom::unvalidated("Drafts").into()),
+ "Archive" => items.push(Atom::unvalidated("Archive").into()),
+ "Sent" => items.push(Atom::unvalidated("Sent").into()),
+ "Trash" => items.push(Atom::unvalidated("Trash").into()),
+ _ => (),
+ };
}
if is_lsub {
ret.push(Data::Lsub {