Skip to content

Commit 845a3e0

Browse files
committed
Upgrade Ruma
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
1 parent bedcbfd commit 845a3e0

File tree

14 files changed

+44
-44
lines changed

14 files changed

+44
-44
lines changed

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ reqwest = { version = "0.12.12", default-features = false }
6060
rmp-serde = "1.3.0"
6161
# Be careful to use commits from the https://github.com/ruma/ruma/tree/ruma-0.12
6262
# branch until a proper release with breaking changes happens.
63-
ruma = { git = "https://github.com/ruma/ruma", rev = "d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a", features = [
63+
ruma = { git = "https://github.com/ruma/ruma", rev = "724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be", features = [
6464
"client-api-c",
6565
"compat-upload-signatures",
6666
"compat-user-id",
6767
"compat-arbitrary-length-ids",
6868
"compat-tag-info",
6969
"compat-encrypted-stickers",
70+
"compat-lax-room-creation-deser",
7071
"unstable-msc3401",
71-
"unstable-msc3266",
7272
"unstable-msc3488",
7373
"unstable-msc3489",
7474
"unstable-msc4075",
@@ -78,7 +78,7 @@ ruma = { git = "https://github.com/ruma/ruma", rev = "d1d53e2b7aaf9190f11a5465b9
7878
"unstable-msc4278",
7979
"unstable-msc4286",
8080
] }
81-
ruma-common = { git = "https://github.com/ruma/ruma", rev = "d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a" }
81+
ruma-common = { git = "https://github.com/ruma/ruma", rev = "724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be" }
8282
sentry = "0.36.0"
8383
sentry-tracing = "0.36.0"
8484
serde = { version = "1.0.217", features = ["rc"] }

bindings/matrix-sdk-ffi/src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use matrix_sdk::{
2020
api::client::{
2121
discovery::{
2222
discover_homeserver::RtcFocusInfo,
23-
get_authorization_server_metadata::msc2965::Prompt as RumaOidcPrompt,
23+
get_authorization_server_metadata::v1::Prompt as RumaOidcPrompt,
2424
},
2525
push::{EmailPusherData, PusherIds, PusherInit, PusherKind as RumaPusherKind},
2626
room::{create_room, Visibility},

crates/matrix-sdk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ rand = { workspace = true, optional = true }
102102
ruma = { workspace = true, features = [
103103
"rand",
104104
"unstable-msc2448",
105-
"unstable-msc2965",
105+
"unstable-msc4191",
106106
"unstable-msc3930",
107107
"unstable-msc3245-v1-compat",
108108
"unstable-msc4230",

crates/matrix-sdk/src/authentication/oauth/account_management_url.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
//! This is a Matrix extension introduced in [MSC4191](https://github.com/matrix-org/matrix-spec-proposals/pull/4191).
1818
1919
use ruma::{
20-
api::client::discovery::get_authorization_server_metadata::msc2965::AccountManagementAction,
20+
api::client::discovery::get_authorization_server_metadata::v1::AccountManagementAction,
2121
OwnedDeviceId,
2222
};
2323
use url::Url;

crates/matrix-sdk/src/authentication/oauth/auth_code_builder.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ use oauth2::{
1818
basic::BasicClient as OAuthClient, AuthUrl, CsrfToken, PkceCodeChallenge, RedirectUrl, Scope,
1919
};
2020
use ruma::{
21-
api::client::discovery::get_authorization_server_metadata::msc2965::Prompt, OwnedDeviceId,
22-
UserId,
21+
api::client::discovery::get_authorization_server_metadata::v1::Prompt, OwnedDeviceId, UserId,
2322
};
2423
use tracing::{info, instrument};
2524
use url::Url;

crates/matrix-sdk/src/authentication/oauth/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub use oauth2::{
2525
StandardErrorResponse,
2626
};
2727
use ruma::{
28-
api::client::discovery::get_authorization_server_metadata::msc2965::AuthorizationServerMetadataUrlError,
28+
api::client::discovery::get_authorization_server_metadata::v1::AuthorizationServerMetadataUrlError,
2929
serde::{PartialEqAsRefStr, StringEnum},
3030
};
3131

crates/matrix-sdk/src/authentication/oauth/mod.rs

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ pub use oauth2::{ClientId, CsrfToken};
187187
use ruma::{
188188
api::client::discovery::get_authorization_server_metadata::{
189189
self,
190-
msc2965::{AccountManagementAction, AuthorizationServerMetadata},
190+
v1::{AccountManagementAction, AuthorizationServerMetadata},
191191
},
192192
serde::Raw,
193193
DeviceId, OwnedDeviceId,
@@ -577,18 +577,17 @@ impl OAuth {
577577
.is_some_and(|err| err.status_code == http::StatusCode::NOT_FOUND)
578578
};
579579

580-
let response = self
581-
.client
582-
.send(get_authorization_server_metadata::msc2965::Request::new())
583-
.await
584-
.map_err(|error| {
585-
// If the endpoint returns a 404, i.e. the server doesn't support the endpoint.
586-
if is_endpoint_unsupported(&error) {
587-
OAuthDiscoveryError::NotSupported
588-
} else {
589-
error.into()
590-
}
591-
})?;
580+
let response =
581+
self.client.send(get_authorization_server_metadata::v1::Request::new()).await.map_err(
582+
|error| {
583+
// If the endpoint returns a 404, i.e. the server doesn't support the endpoint.
584+
if is_endpoint_unsupported(&error) {
585+
OAuthDiscoveryError::NotSupported
586+
} else {
587+
error.into()
588+
}
589+
},
590+
)?;
592591

593592
let metadata = response.metadata.deserialize()?;
594593

crates/matrix-sdk/src/authentication/oauth/qrcode/login.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use matrix_sdk_base::{
2424
};
2525
use oauth2::{DeviceCodeErrorResponseType, StandardDeviceAuthorizationResponse};
2626
use ruma::{
27-
api::client::discovery::get_authorization_server_metadata::msc2965::AuthorizationServerMetadata,
27+
api::client::discovery::get_authorization_server_metadata::v1::AuthorizationServerMetadata,
2828
OwnedDeviceId,
2929
};
3030
use tracing::trace;

crates/matrix-sdk/src/authentication/oauth/registration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use language_tags::LanguageTag;
2323
use matrix_sdk_base::deserialized_responses::PrivOwnedStr;
2424
use oauth2::{AsyncHttpClient, ClientId, HttpClientError, RequestTokenError};
2525
use ruma::{
26-
api::client::discovery::get_authorization_server_metadata::msc2965::{GrantType, ResponseType},
26+
api::client::discovery::get_authorization_server_metadata::v1::{GrantType, ResponseType},
2727
serde::{PartialEqAsRefStr, Raw, StringEnum},
2828
SecondsSinceUnixEpoch,
2929
};

0 commit comments

Comments
 (0)