IMAP: Allow ENABLE UTF8 in IMAPrev1
This commit is contained in:
@@ -42,21 +42,19 @@ async fn main() -> std::io::Result<()> {
|
||||
parse_credentials(&credentials)
|
||||
} else if let Ok(credentials) = std::env::var("CREDENTIALS") {
|
||||
parse_credentials(&credentials)
|
||||
} else if args.anonymous {
|
||||
let credentials = "anonymous:".to_string();
|
||||
parse_credentials(&credentials)
|
||||
} else {
|
||||
if args.anonymous {
|
||||
let credentials = "anonymous:".to_string();
|
||||
let credentials = rpassword::prompt_password(
|
||||
"\nEnter administrator credentials or press [ENTER] to use OAuth: ",
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
if !credentials.is_empty() {
|
||||
parse_credentials(&credentials)
|
||||
} else {
|
||||
let credentials = rpassword::prompt_password(
|
||||
"\nEnter administrator credentials or press [ENTER] to use OAuth: ",
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
if !credentials.is_empty() {
|
||||
parse_credentials(&credentials)
|
||||
} else {
|
||||
oauth(&url).await
|
||||
}
|
||||
oauth(&url).await
|
||||
}
|
||||
},
|
||||
timeout: args.timeout,
|
||||
@@ -178,7 +176,7 @@ async fn oauth(url: &str) -> Credentials {
|
||||
#[serde(untagged)]
|
||||
pub enum Response<T> {
|
||||
Error(ManagementApiError),
|
||||
Data { data: T }
|
||||
Data { data: T },
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
@@ -287,7 +285,7 @@ impl Client {
|
||||
Response::Error(error) => {
|
||||
eprintln!("Request failed: {error})");
|
||||
std::process::exit(1);
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user