X-Git-Url: https://git.r.bdr.sh/rbdr/olden-mail/blobdiff_plain/408fda8d8b94fdfd9ad9b9b07faa9716df3d7346..8ef3566a8961e2305ab701fce160de0dba1d050c:/src/middleware/find_mailboxes_compatibility.rs diff --git a/src/middleware/find_mailboxes_compatibility.rs b/src/middleware/find_mailboxes_compatibility.rs index 04bc834..6a9b341 100644 --- a/src/middleware/find_mailboxes_compatibility.rs +++ b/src/middleware/find_mailboxes_compatibility.rs @@ -5,10 +5,12 @@ use log::debug; /// a LIST command. pub fn middleware(input: &[u8]) -> Vec { let command = String::from_utf8_lossy(input); - if let Some(tag) = command.split("FIND MAILBOXES /*").next() { - let replacement = format!("{} LIST \"/INBOX\" \"*\"\r\n", tag.trim()); - debug!("### {replacement}"); - return replacement.into_bytes(); + if command.contains("FIND MAILBOXES /*") { + if let Some(tag) = command.split("FIND MAILBOXES /*").next() { + let replacement = format!("{} LIST \"\" \"*\"\r\n", tag.trim()); + debug!("### {replacement}"); + return replacement.into_bytes(); + } } input.to_vec() }