aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/imap/command/authenticated.rs7
-rw-r--r--src/imap/mailbox_view.rs4
2 files changed, 8 insertions, 3 deletions
diff --git a/src/imap/command/authenticated.rs b/src/imap/command/authenticated.rs
index 32a8e1e..7f6531c 100644
--- a/src/imap/command/authenticated.rs
+++ b/src/imap/command/authenticated.rs
@@ -167,8 +167,13 @@ impl<'a> AuthenticatedContext<'a> {
}
}
+ let msg = if is_lsub {
+ "LSUB completed"
+ } else {
+ "LIST completed"
+ };
Ok((
- Response::ok("LIST completed")?.with_body(ret),
+ Response::ok(msg)?.with_body(ret),
flow::Transition::None,
))
}
diff --git a/src/imap/mailbox_view.rs b/src/imap/mailbox_view.rs
index 371bc50..f384a79 100644
--- a/src/imap/mailbox_view.rs
+++ b/src/imap/mailbox_view.rs
@@ -252,7 +252,7 @@ impl MailboxView {
let mut ret = vec![];
for (i, uid, uuid, meta, body) in mails {
- let mut attributes = vec![MessageAttribute::Uid(uid)];
+ let mut attributes = vec![];
let (_uid2, flags) = self
.known_state
@@ -270,7 +270,7 @@ impl MailboxView {
for attr in fetch_attrs.iter() {
match attr {
- FetchAttribute::Uid => (),
+ FetchAttribute::Uid => attributes.push(MessageAttribute::Uid(uid)),
FetchAttribute::Flags => {
attributes.push(MessageAttribute::Flags(
flags.iter().filter_map(|f| string_to_flag(f)).collect(),