chore: bump ruma

master
Johannes Becker 2021-04-26 08:05:58 +02:00
parent ab180362c9
commit 5c882f89e8
9 changed files with 8 additions and 19 deletions

View File

@ -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

View File

@ -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"]

View File

@ -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<String> {
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::<Vec<u8>>(homeserver.as_str(), SendAccessToken::None);
match request {
Ok(req) => Ok(req.uri().to_string()),
Err(err) => Err(Error::from(HttpError::from(err))),

View File

@ -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),
};

View File

@ -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.

View File

@ -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"]

View File

@ -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,

View File

@ -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]

View File

@ -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},