From 7b2dfa39cff443b1dddad0a3e85ef5c1c80d644b Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Mon, 14 Mar 2022 12:57:58 +0100 Subject: [PATCH] Remove Client::get_supported_versions This is now always done as part of constructing the Client, unless the user actively opted out. --- crates/matrix-sdk/src/client/mod.rs | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/crates/matrix-sdk/src/client/mod.rs b/crates/matrix-sdk/src/client/mod.rs index 4f0405f5c..904d4f947 100644 --- a/crates/matrix-sdk/src/client/mod.rs +++ b/crates/matrix-sdk/src/client/mod.rs @@ -44,7 +44,6 @@ use ruma::{ capabilities::{get_capabilities, Capabilities}, device::{delete_devices, get_devices}, directory::{get_public_rooms, get_public_rooms_filtered}, - discover::get_supported_versions, filter::{create_filter::v3::Request as FilterUploadRequest, FilterDefinition}, media::{create_content, get_content, get_content_thumbnail}, membership::{join_room_by_id, join_room_by_id_or_alias}, @@ -210,29 +209,6 @@ impl Client { *homeserver = homeserver_url; } - /// Get the versions supported by the homeserver. - /// - /// This method should be used to check that a server is a valid Matrix - /// homeserver. - /// - /// # Example - /// ```no_run - /// # use futures::executor::block_on; - /// # block_on(async { - /// use matrix_sdk::{Client}; - /// use url::Url; - /// - /// let homeserver = Url::parse("http://example.com")?; - /// let client = Client::new(homeserver).await?; - /// - /// // Check that it is a valid homeserver. - /// client.get_supported_versions().await?; - /// # Result::<_, anyhow::Error>::Ok(()) }); - /// ``` - pub async fn get_supported_versions(&self) -> HttpResult { - self.send(get_supported_versions::Request::new(), Some(RequestConfig::short_retry())).await - } - /// Get the capabilities of the homeserver. /// /// This method should be used to check what features are supported by the