diff --git a/bindings/matrix-sdk-ffi/src/client_builder.rs b/bindings/matrix-sdk-ffi/src/client_builder.rs index e66879a6f..c1e9f8711 100644 --- a/bindings/matrix-sdk-ffi/src/client_builder.rs +++ b/bindings/matrix-sdk-ffi/src/client_builder.rs @@ -6,10 +6,7 @@ use matrix_sdk::{ crypto::types::qr_login::{LoginQrCodeDecodeError, QrCodeModeData}, encryption::{BackupDownloadStrategy, EncryptionSettings}, reqwest::Certificate, - ruma::{ - api::{error::UnknownVersionError, MatrixVersion}, - ServerName, UserId, - }, + ruma::{ServerName, UserId}, Client as MatrixClient, ClientBuildError as MatrixClientBuildError, HttpError, IdParseError, RumaApiError, }; @@ -250,7 +247,6 @@ pub struct ClientBuilder { session_path: Option, username: Option, homeserver_cfg: Option, - server_versions: Option>, passphrase: Zeroizing>, user_agent: Option, requires_sliding_sync: bool, @@ -272,7 +268,6 @@ impl ClientBuilder { session_path: None, username: None, homeserver_cfg: None, - server_versions: None, passphrase: Zeroizing::new(None), user_agent: None, requires_sliding_sync: false, @@ -329,12 +324,6 @@ impl ClientBuilder { Arc::new(builder) } - pub fn server_versions(self: Arc, versions: Vec) -> Arc { - let mut builder = unwrap_or_clone_arc(self); - builder.server_versions = Some(versions); - Arc::new(builder) - } - pub fn server_name(self: Arc, server_name: String) -> Arc { let mut builder = unwrap_or_clone_arc(self); builder.homeserver_cfg = Some(HomeserverConfig::ServerName(server_name)); @@ -508,16 +497,6 @@ impl ClientBuilder { inner_builder = inner_builder.user_agent(user_agent); } - if let Some(server_versions) = builder.server_versions { - inner_builder = inner_builder.server_versions( - server_versions - .iter() - .map(|s| MatrixVersion::try_from(s.as_str())) - .collect::, UnknownVersionError>>() - .map_err(|e| ClientBuildError::Generic { message: e.to_string() })?, - ); - } - inner_builder = inner_builder.with_encryption_settings(builder.encryption_settings); if builder.requires_sliding_sync {