Browse Source

melib/imap: Set special usage attributes for INBOX

Without this change, the usage is not correctly identified when calling
imap_mailboxes in the imap backend.
jmap-eventsource
matzipan@gmail.com 12 months ago
committed by Manos Pitsidianakis
parent
commit
aa503deb76
Signed by: epilys GPG Key ID: 73627C2F690DF710
  1. 8
      melib/src/backends/imap/protocol_parser.rs

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

@ -450,7 +450,13 @@ pub fn list_mailbox_result(input: &[u8]) -> IResult<&[u8], ImapMailbox> {
let separator: u8 = separator[0];
let mut f = ImapMailbox::default();
f.no_select = false;
f.is_subscribed = path.eq_ignore_ascii_case("INBOX");
f.is_subscribed = false;
if path.eq_ignore_ascii_case("INBOX") {
f.is_subscribed = true;
let _ = f.set_special_usage(SpecialUsageMailbox::Inbox);
}
for p in properties.split(|&b| b == b' ') {
if p.eq_ignore_ascii_case(b"\\NoSelect") || p.eq_ignore_ascii_case(b"\\NonExistent")
{

Loading…
Cancel
Save