diff options
author | cel 🌸 <cel@blos.sm> | 2023-07-12 21:11:20 +0100 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2023-07-12 21:11:20 +0100 |
commit | 322b2a3b46348ec1c5acbc538de93310c9030b96 (patch) | |
tree | e447920e2414c4d3d99ce021785f0fe8103d378a /src/client/mod.rs | |
parent | c9683935f1e94a701be3e6efe0634dbc63c861de (diff) | |
download | luz-322b2a3b46348ec1c5acbc538de93310c9030b96.tar.gz luz-322b2a3b46348ec1c5acbc538de93310c9030b96.tar.bz2 luz-322b2a3b46348ec1c5acbc538de93310c9030b96.zip |
reimplement sasl (with SCRAM!)
Diffstat (limited to '')
-rw-r--r-- | src/client/mod.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs index d545923..280e0a1 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -17,14 +17,11 @@ impl<'j> JabberClientType<'j> { match self { Self::Encrypted(c) => Ok(c), Self::Unencrypted(mut c) => { - if let Some(features) = c.get_features().await? { - if features.contains(&StreamFeature::StartTls) { - Ok(c.starttls().await?) - } else { - Err(JabberError::StartTlsUnavailable) - } + let features = c.get_features().await?; + if features.contains(&StreamFeature::StartTls) { + Ok(c.starttls().await?) } else { - Err(JabberError::NoFeatures) + Err(JabberError::StartTlsUnavailable) } } } |