mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-19 06:04:31 -04:00
fix(ffi): Adapt FFI calls to Client::server_vendor_info to the new API
Specially important, the one from `ClientBuilder::build` as it avoids a situation where the builder would infinitely try to get a response for this request and never create the `Client` or fail.
This commit is contained in:
committed by
Jorge Martin Espinosa
parent
6765ca0c39
commit
7767ef6ca3
@@ -1628,7 +1628,7 @@ impl Client {
|
||||
/// This method retrieves information about the server's name and version
|
||||
/// by calling the `/_matrix/federation/v1/version` endpoint.
|
||||
pub async fn server_vendor_info(&self) -> Result<matrix_sdk::ServerVendorInfo, ClientError> {
|
||||
Ok(self.inner.server_vendor_info().await?)
|
||||
Ok(self.inner.server_vendor_info(None).await?)
|
||||
}
|
||||
|
||||
/// Subscribe to changes in the media preview configuration.
|
||||
|
||||
@@ -574,8 +574,12 @@ impl ClientBuilder {
|
||||
|
||||
let sdk_client = inner_builder.build().await?;
|
||||
|
||||
// Disable retries for this request to prevent it from being retried
|
||||
// indefinitely
|
||||
let config = sdk_client.request_config().disable_retry();
|
||||
|
||||
// Log server version information at info level.
|
||||
if let Ok(server_info) = sdk_client.server_vendor_info().await {
|
||||
if let Ok(server_info) = sdk_client.server_vendor_info(Some(config)).await {
|
||||
tracing::info!(
|
||||
server_name = %server_info.server_name,
|
||||
version = %server_info.version,
|
||||
|
||||
Reference in New Issue
Block a user