mirror of
https://github.com/chatmail/core.git
synced 2026-04-25 09:26:30 +03:00
Validate and simplify LoginParam struct
This makes sure that under normal circumstances the LoginParam struct is always fully validated, ensure future use does not have to be careful with this. The brittle handling of `server_flags` is also abstraced away from users of it and is now handled entirely internally, as the flags is really only a boolean a lot of the flag parsing complexity is removed. The OAuth2 flag is moved into the ServerLoginParam struct as it really belongs in there.
This commit is contained in:
@@ -342,7 +342,7 @@ impl Context {
|
||||
|
||||
pub async fn get_info(&self) -> Result<BTreeMap<&'static str, String>> {
|
||||
let unset = "0";
|
||||
let l = LoginParam::load_candidate_params(self).await?;
|
||||
let l = LoginParam::load_candidate_params_unchecked(self).await?;
|
||||
let l2 = LoginParam::load_configured_params(self).await?;
|
||||
let secondary_addrs = self.get_secondary_self_addrs().await?.join(", ");
|
||||
let displayname = self.get_config(Config::Displayname).await?;
|
||||
|
||||
Reference in New Issue
Block a user