Skip to content

Commit 93f71ba

Browse files
pixlwavestefanceriu
authored andcommitted
ffi: Add support for checking login with QR code availability.
1 parent 4ea0418 commit 93f71ba

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

bindings/matrix-sdk-ffi/src/client.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,6 +1870,12 @@ impl Client {
18701870
.any(|focus| matches!(focus, RtcFocusInfo::LiveKit(_))))
18711871
}
18721872

1873+
/// Checks if the server supports login using a QR code.
1874+
pub async fn is_login_with_qr_code_supported(&self) -> Result<bool, ClientError> {
1875+
Ok(matches!(self.inner.auth_api(), Some(AuthApi::OAuth(_)))
1876+
&& self.inner.unstable_features().await?.contains(&ruma::api::FeatureFlag::Msc4108))
1877+
}
1878+
18731879
/// Get server vendor information from the federation API.
18741880
///
18751881
/// This method retrieves information about the server's name and version

0 commit comments

Comments
 (0)