From 5c882f89e8633fec58c5e1c5414c1960a025ec0b Mon Sep 17 00:00:00 2001 From: Johannes Becker Date: Mon, 26 Apr 2021 08:05:58 +0200 Subject: [PATCH] chore: bump ruma --- .github/workflows/ci.yml | 4 ---- matrix_sdk/Cargo.toml | 1 - matrix_sdk/src/client.rs | 6 +++--- matrix_sdk/src/http_client.rs | 6 +++--- matrix_sdk/src/lib.rs | 2 -- matrix_sdk_base/Cargo.toml | 1 - matrix_sdk_base/src/lib.rs | 2 -- matrix_sdk_common/Cargo.toml | 3 +-- matrix_sdk_common/src/lib.rs | 2 +- 9 files changed, 8 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d268f677..08849418 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,7 +99,6 @@ jobs: - linux / features-no-encryption-and-sled - linux / features-sled_cryptostore - linux / features-rustls-tls - - linux / features-unstable-synapse-quirks - linux / features-markdown - linux / features-socks - linux / features-sso_login @@ -120,9 +119,6 @@ jobs: - name: linux / features-rustls-tls cargo_args: --no-default-features --features rustls-tls - - name: linux / features-unstable-synapse-quirks - cargo_args: --features unstable-synapse-quirks - - name: linux / features-markdown cargo_args: --features markdown diff --git a/matrix_sdk/Cargo.toml b/matrix_sdk/Cargo.toml index d019cc82..cc254dd3 100644 --- a/matrix_sdk/Cargo.toml +++ b/matrix_sdk/Cargo.toml @@ -20,7 +20,6 @@ default = ["encryption", "sled_cryptostore", "sled_state_store", "native-tls"] encryption = ["matrix-sdk-base/encryption"] sled_state_store = ["matrix-sdk-base/sled_state_store"] sled_cryptostore = ["matrix-sdk-base/sled_cryptostore"] -unstable-synapse-quirks = ["matrix-sdk-base/unstable-synapse-quirks"] markdown = ["matrix-sdk-base/markdown"] native-tls = ["reqwest/native-tls"] rustls-tls = ["reqwest/rustls-tls"] diff --git a/matrix_sdk/src/client.rs b/matrix_sdk/src/client.rs index a41a009a..2d2e3f57 100644 --- a/matrix_sdk/src/client.rs +++ b/matrix_sdk/src/client.rs @@ -56,7 +56,7 @@ use tracing::{error, info, instrument}; use matrix_sdk_base::{ deserialized_responses::SyncResponse, events::AnyMessageEventContent, identifiers::MxcUri, - BaseClient, BaseClientConfig, Session, Store, + BaseClient, BaseClientConfig, SendAccessToken, Session, Store, }; #[cfg(feature = "encryption")] @@ -821,8 +821,8 @@ impl Client { /// [`login_with_token`]: #method.login_with_token pub fn get_sso_login_url(&self, redirect_url: &str) -> Result { let homeserver = self.homeserver(); - let request = - sso_login::Request::new(redirect_url).try_into_http_request(homeserver.as_str(), None); + let request = sso_login::Request::new(redirect_url) + .try_into_http_request::>(homeserver.as_str(), SendAccessToken::None); match request { Ok(req) => Ok(req.uri().to_string()), Err(err) => Err(Error::from(HttpError::from(err))), diff --git a/matrix_sdk/src/http_client.rs b/matrix_sdk/src/http_client.rs index 81c1dab9..8377c53a 100644 --- a/matrix_sdk/src/http_client.rs +++ b/matrix_sdk/src/http_client.rs @@ -27,7 +27,7 @@ use url::Url; use matrix_sdk_common::{ api::r0::media::create_content, async_trait, locks::RwLock, AsyncTraitDeps, AuthScheme, - FromHttpResponseError, IncomingResponse, + FromHttpResponseError, IncomingResponse, SendAccessToken, }; use crate::{error::HttpError, Bytes, ClientConfig, OutgoingRequest, RequestConfig, Session}; @@ -112,12 +112,12 @@ impl HttpClient { read_guard = session.read().await; if let Some(session) = read_guard.as_ref() { - Some(session.access_token.as_str()) + SendAccessToken::IfRequired(session.access_token.as_str()) } else { return Err(HttpError::AuthenticationRequired); } } - AuthScheme::None => None, + AuthScheme::None => SendAccessToken::None, _ => return Err(HttpError::NotClientRequest), }; diff --git a/matrix_sdk/src/lib.rs b/matrix_sdk/src/lib.rs index cbfbaa05..d77ebd68 100644 --- a/matrix_sdk/src/lib.rs +++ b/matrix_sdk/src/lib.rs @@ -41,8 +41,6 @@ //! keys. If this is disabled and `encryption` support is enabled the keys will //! by default be stored only in memory and thus lost after the client is //! destroyed. -//! * `unstable-synapse-quirks`: Enables support to deal with inconsistencies -//! of Synapse in compliance with the Matrix API specification. //! * `markdown`: Support for sending markdown formatted messages. //! * `socks`: Enables SOCKS support in reqwest, the default HTTP client. //! * `sso_login`: Enables SSO login with a local http server. diff --git a/matrix_sdk_base/Cargo.toml b/matrix_sdk_base/Cargo.toml index 92744aa3..baf1b072 100644 --- a/matrix_sdk_base/Cargo.toml +++ b/matrix_sdk_base/Cargo.toml @@ -19,7 +19,6 @@ default = [] encryption = ["matrix-sdk-crypto"] sled_state_store = ["sled", "pbkdf2", "hmac", "sha2", "rand", "chacha20poly1305"] sled_cryptostore = ["matrix-sdk-crypto/sled_cryptostore"] -unstable-synapse-quirks = ["matrix-sdk-common/unstable-synapse-quirks"] markdown = ["matrix-sdk-common/markdown"] docs = ["encryption", "sled_cryptostore"] diff --git a/matrix_sdk_base/src/lib.rs b/matrix_sdk_base/src/lib.rs index 25f34d9c..7d70a216 100644 --- a/matrix_sdk_base/src/lib.rs +++ b/matrix_sdk_base/src/lib.rs @@ -24,8 +24,6 @@ //! keys. If this is disabled and `encryption` support is enabled the keys will //! by default be stored only in memory and thus lost after the client is //! destroyed. -//! * `unstable-synapse-quirks`: Enables support to deal with inconsistencies -//! of Synapse in compliance with the Matrix API specification. //! * `markdown`: Support for sending markdown formatted messages. #![deny( missing_debug_implementations, diff --git a/matrix_sdk_common/Cargo.toml b/matrix_sdk_common/Cargo.toml index 3a284e4d..5224a032 100644 --- a/matrix_sdk_common/Cargo.toml +++ b/matrix_sdk_common/Cargo.toml @@ -11,7 +11,6 @@ repository = "https://github.com/matrix-org/matrix-rust-sdk" version = "0.2.0" [features] -unstable-synapse-quirks = ["ruma/unstable-synapse-quirks"] markdown = ["ruma/markdown"] [dependencies] @@ -22,7 +21,7 @@ async-trait = "0.1.42" [dependencies.ruma] version = "0.0.3" git = "https://github.com/ruma/ruma" -rev = "c816630058ab625d93ebab294e9e6c02dd9d866c" +rev = "1e005f576e4640ee5ce6e357bcf33293819502d1" features = ["client-api-c", "compat", "unstable-pre-spec"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies] diff --git a/matrix_sdk_common/src/lib.rs b/matrix_sdk_common/src/lib.rs index c2131e52..fd0e43d9 100644 --- a/matrix_sdk_common/src/lib.rs +++ b/matrix_sdk_common/src/lib.rs @@ -4,7 +4,7 @@ pub use ruma::{ api::{ client as api, error::{FromHttpRequestError, FromHttpResponseError, IntoHttpError, ServerError}, - AuthScheme, EndpointError, IncomingResponse, OutgoingRequest, + AuthScheme, EndpointError, IncomingResponse, OutgoingRequest, SendAccessToken, }, assign, directory, encryption, events, identifiers, int, presence, push, serde::{CanonicalJsonValue, Raw},