mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-08 07:56:55 -04:00
committed by
Damir Jelić
parent
74800e20b4
commit
5448192ea4
16
Cargo.lock
generated
16
Cargo.lock
generated
@@ -4461,7 +4461,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma"
|
||||
version = "0.12.3"
|
||||
source = "git+https://github.com/ruma/ruma?rev=d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a#d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a"
|
||||
source = "git+https://github.com/ruma/ruma?rev=724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be#724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be"
|
||||
dependencies = [
|
||||
"assign",
|
||||
"js_int",
|
||||
@@ -4477,7 +4477,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma-client-api"
|
||||
version = "0.20.3"
|
||||
source = "git+https://github.com/ruma/ruma?rev=d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a#d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a"
|
||||
source = "git+https://github.com/ruma/ruma?rev=724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be#724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be"
|
||||
dependencies = [
|
||||
"as_variant",
|
||||
"assign",
|
||||
@@ -4500,7 +4500,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma-common"
|
||||
version = "0.15.2"
|
||||
source = "git+https://github.com/ruma/ruma?rev=d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a#d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a"
|
||||
source = "git+https://github.com/ruma/ruma?rev=724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be#724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be"
|
||||
dependencies = [
|
||||
"as_variant",
|
||||
"base64",
|
||||
@@ -4532,7 +4532,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma-events"
|
||||
version = "0.30.3"
|
||||
source = "git+https://github.com/ruma/ruma?rev=d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a#d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a"
|
||||
source = "git+https://github.com/ruma/ruma?rev=724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be#724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be"
|
||||
dependencies = [
|
||||
"as_variant",
|
||||
"indexmap",
|
||||
@@ -4557,7 +4557,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma-federation-api"
|
||||
version = "0.11.1"
|
||||
source = "git+https://github.com/ruma/ruma?rev=d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a#d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a"
|
||||
source = "git+https://github.com/ruma/ruma?rev=724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be#724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be"
|
||||
dependencies = [
|
||||
"http",
|
||||
"js_int",
|
||||
@@ -4571,7 +4571,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma-html"
|
||||
version = "0.4.1"
|
||||
source = "git+https://github.com/ruma/ruma?rev=d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a#d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a"
|
||||
source = "git+https://github.com/ruma/ruma?rev=724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be#724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be"
|
||||
dependencies = [
|
||||
"as_variant",
|
||||
"html5ever",
|
||||
@@ -4583,7 +4583,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma-identifiers-validation"
|
||||
version = "0.10.1"
|
||||
source = "git+https://github.com/ruma/ruma?rev=d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a#d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a"
|
||||
source = "git+https://github.com/ruma/ruma?rev=724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be#724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be"
|
||||
dependencies = [
|
||||
"js_int",
|
||||
"thiserror 2.0.11",
|
||||
@@ -4592,7 +4592,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ruma-macros"
|
||||
version = "0.15.1"
|
||||
source = "git+https://github.com/ruma/ruma?rev=d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a#d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a"
|
||||
source = "git+https://github.com/ruma/ruma?rev=724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be#724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"proc-macro-crate",
|
||||
|
||||
@@ -60,15 +60,15 @@ reqwest = { version = "0.12.12", default-features = false }
|
||||
rmp-serde = "1.3.0"
|
||||
# Be careful to use commits from the https://github.com/ruma/ruma/tree/ruma-0.12
|
||||
# branch until a proper release with breaking changes happens.
|
||||
ruma = { git = "https://github.com/ruma/ruma", rev = "d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a", features = [
|
||||
ruma = { git = "https://github.com/ruma/ruma", rev = "724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be", features = [
|
||||
"client-api-c",
|
||||
"compat-upload-signatures",
|
||||
"compat-user-id",
|
||||
"compat-arbitrary-length-ids",
|
||||
"compat-tag-info",
|
||||
"compat-encrypted-stickers",
|
||||
"compat-lax-room-create-deser",
|
||||
"unstable-msc3401",
|
||||
"unstable-msc3266",
|
||||
"unstable-msc3488",
|
||||
"unstable-msc3489",
|
||||
"unstable-msc4075",
|
||||
@@ -78,7 +78,7 @@ ruma = { git = "https://github.com/ruma/ruma", rev = "d1d53e2b7aaf9190f11a5465b9
|
||||
"unstable-msc4278",
|
||||
"unstable-msc4286",
|
||||
] }
|
||||
ruma-common = { git = "https://github.com/ruma/ruma", rev = "d1d53e2b7aaf9190f11a5465b9edf6a19fc5b59a" }
|
||||
ruma-common = { git = "https://github.com/ruma/ruma", rev = "724ed061ae3bf9a2b5ccfdbcd500e77e6069a3be" }
|
||||
sentry = "0.36.0"
|
||||
sentry-tracing = "0.36.0"
|
||||
serde = { version = "1.0.217", features = ["rc"] }
|
||||
|
||||
@@ -20,7 +20,7 @@ use matrix_sdk::{
|
||||
api::client::{
|
||||
discovery::{
|
||||
discover_homeserver::RtcFocusInfo,
|
||||
get_authorization_server_metadata::msc2965::Prompt as RumaOidcPrompt,
|
||||
get_authorization_server_metadata::v1::Prompt as RumaOidcPrompt,
|
||||
},
|
||||
push::{EmailPusherData, PusherIds, PusherInit, PusherKind as RumaPusherKind},
|
||||
room::{create_room, Visibility},
|
||||
|
||||
@@ -102,7 +102,7 @@ rand = { workspace = true, optional = true }
|
||||
ruma = { workspace = true, features = [
|
||||
"rand",
|
||||
"unstable-msc2448",
|
||||
"unstable-msc2965",
|
||||
"unstable-msc4191",
|
||||
"unstable-msc3930",
|
||||
"unstable-msc3245-v1-compat",
|
||||
"unstable-msc4230",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! This is a Matrix extension introduced in [MSC4191](https://github.com/matrix-org/matrix-spec-proposals/pull/4191).
|
||||
|
||||
use ruma::{
|
||||
api::client::discovery::get_authorization_server_metadata::msc2965::AccountManagementAction,
|
||||
api::client::discovery::get_authorization_server_metadata::v1::AccountManagementAction,
|
||||
OwnedDeviceId,
|
||||
};
|
||||
use url::Url;
|
||||
|
||||
@@ -18,8 +18,7 @@ use oauth2::{
|
||||
basic::BasicClient as OAuthClient, AuthUrl, CsrfToken, PkceCodeChallenge, RedirectUrl, Scope,
|
||||
};
|
||||
use ruma::{
|
||||
api::client::discovery::get_authorization_server_metadata::msc2965::Prompt, OwnedDeviceId,
|
||||
UserId,
|
||||
api::client::discovery::get_authorization_server_metadata::v1::Prompt, OwnedDeviceId, UserId,
|
||||
};
|
||||
use tracing::{info, instrument};
|
||||
use url::Url;
|
||||
|
||||
@@ -25,7 +25,7 @@ pub use oauth2::{
|
||||
StandardErrorResponse,
|
||||
};
|
||||
use ruma::{
|
||||
api::client::discovery::get_authorization_server_metadata::msc2965::AuthorizationServerMetadataUrlError,
|
||||
api::client::discovery::get_authorization_server_metadata::v1::AuthorizationServerMetadataUrlError,
|
||||
serde::{PartialEqAsRefStr, StringEnum},
|
||||
};
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ pub use oauth2::{ClientId, CsrfToken};
|
||||
use ruma::{
|
||||
api::client::discovery::get_authorization_server_metadata::{
|
||||
self,
|
||||
msc2965::{AccountManagementAction, AuthorizationServerMetadata},
|
||||
v1::{AccountManagementAction, AuthorizationServerMetadata},
|
||||
},
|
||||
serde::Raw,
|
||||
DeviceId, OwnedDeviceId,
|
||||
@@ -577,18 +577,17 @@ impl OAuth {
|
||||
.is_some_and(|err| err.status_code == http::StatusCode::NOT_FOUND)
|
||||
};
|
||||
|
||||
let response = self
|
||||
.client
|
||||
.send(get_authorization_server_metadata::msc2965::Request::new())
|
||||
.await
|
||||
.map_err(|error| {
|
||||
// If the endpoint returns a 404, i.e. the server doesn't support the endpoint.
|
||||
if is_endpoint_unsupported(&error) {
|
||||
OAuthDiscoveryError::NotSupported
|
||||
} else {
|
||||
error.into()
|
||||
}
|
||||
})?;
|
||||
let response =
|
||||
self.client.send(get_authorization_server_metadata::v1::Request::new()).await.map_err(
|
||||
|error| {
|
||||
// If the endpoint returns a 404, i.e. the server doesn't support the endpoint.
|
||||
if is_endpoint_unsupported(&error) {
|
||||
OAuthDiscoveryError::NotSupported
|
||||
} else {
|
||||
error.into()
|
||||
}
|
||||
},
|
||||
)?;
|
||||
|
||||
let metadata = response.metadata.deserialize()?;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ use matrix_sdk_base::{
|
||||
};
|
||||
use oauth2::{DeviceCodeErrorResponseType, StandardDeviceAuthorizationResponse};
|
||||
use ruma::{
|
||||
api::client::discovery::get_authorization_server_metadata::msc2965::AuthorizationServerMetadata,
|
||||
api::client::discovery::get_authorization_server_metadata::v1::AuthorizationServerMetadata,
|
||||
OwnedDeviceId,
|
||||
};
|
||||
use tracing::trace;
|
||||
|
||||
@@ -23,7 +23,7 @@ use language_tags::LanguageTag;
|
||||
use matrix_sdk_base::deserialized_responses::PrivOwnedStr;
|
||||
use oauth2::{AsyncHttpClient, ClientId, HttpClientError, RequestTokenError};
|
||||
use ruma::{
|
||||
api::client::discovery::get_authorization_server_metadata::msc2965::{GrantType, ResponseType},
|
||||
api::client::discovery::get_authorization_server_metadata::v1::{GrantType, ResponseType},
|
||||
serde::{PartialEqAsRefStr, Raw, StringEnum},
|
||||
SecondsSinceUnixEpoch,
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ use matrix_sdk_base::store::RoomLoadSettings;
|
||||
use matrix_sdk_test::async_test;
|
||||
use oauth2::{ClientId, CsrfToken, PkceCodeChallenge, RedirectUrl};
|
||||
use ruma::{
|
||||
api::client::discovery::get_authorization_server_metadata::msc2965::Prompt, device_id,
|
||||
api::client::discovery::get_authorization_server_metadata::v1::Prompt, device_id,
|
||||
owned_device_id, user_id, DeviceId, ServerName,
|
||||
};
|
||||
use tokio::sync::broadcast::error::TryRecvError;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
use matrix_sdk_base::ttl_cache::TtlCache;
|
||||
use ruma::api::client::discovery::get_authorization_server_metadata::msc2965::AuthorizationServerMetadata;
|
||||
use ruma::api::client::discovery::get_authorization_server_metadata::v1::AuthorizationServerMetadata;
|
||||
use tokio::sync::RwLock;
|
||||
|
||||
use super::ClientServerInfo;
|
||||
|
||||
@@ -22,7 +22,6 @@ use futures_util::future::join_all;
|
||||
use matrix_sdk_base::{RoomHero, RoomInfo, RoomState};
|
||||
use ruma::{
|
||||
api::client::{membership::joined_members, state::get_state_events},
|
||||
directory::PublicRoomJoinRule,
|
||||
events::room::{history_visibility::HistoryVisibility, join_rules::JoinRule},
|
||||
room::RoomType,
|
||||
space::SpaceRoomJoinRule,
|
||||
@@ -253,7 +252,7 @@ impl RoomPreview {
|
||||
let own_server_name = client.session_meta().map(|s| s.user_id.server_name());
|
||||
let via = ensure_server_names_is_not_empty(own_server_name, via, room_or_alias_id);
|
||||
|
||||
let request = ruma::api::client::room::get_summary::msc3266::Request::new(
|
||||
let request = ruma::api::client::room::get_summary::v1::Request::new(
|
||||
room_or_alias_id.to_owned(),
|
||||
via,
|
||||
);
|
||||
@@ -278,17 +277,19 @@ impl RoomPreview {
|
||||
None
|
||||
};
|
||||
|
||||
let summary = response.summary;
|
||||
|
||||
Ok(RoomPreview {
|
||||
room_id,
|
||||
canonical_alias: response.canonical_alias,
|
||||
name: response.name,
|
||||
topic: response.topic,
|
||||
avatar_url: response.avatar_url,
|
||||
num_joined_members: response.num_joined_members.into(),
|
||||
canonical_alias: summary.canonical_alias,
|
||||
name: summary.name,
|
||||
topic: summary.topic,
|
||||
avatar_url: summary.avatar_url,
|
||||
num_joined_members: summary.num_joined_members.into(),
|
||||
num_active_members,
|
||||
room_type: response.room_type,
|
||||
join_rule: Some(response.join_rule),
|
||||
is_world_readable: Some(response.world_readable),
|
||||
room_type: summary.room_type,
|
||||
join_rule: Some(summary.join_rule.into()),
|
||||
is_world_readable: Some(summary.world_readable),
|
||||
state,
|
||||
is_direct,
|
||||
heroes: cached_room.map(|r| r.heroes()),
|
||||
@@ -375,14 +376,7 @@ async fn search_for_room_preview_in_room_directory(
|
||||
num_active_members: None,
|
||||
// Assume it's a room
|
||||
room_type: None,
|
||||
join_rule: Some(match room_description.join_rule {
|
||||
PublicRoomJoinRule::Public => SpaceRoomJoinRule::Public,
|
||||
PublicRoomJoinRule::Knock => SpaceRoomJoinRule::Knock,
|
||||
PublicRoomJoinRule::_Custom(rule) => SpaceRoomJoinRule::_Custom(rule),
|
||||
_ => {
|
||||
panic!("Unexpected PublicRoomJoinRule {:?}", room_description.join_rule)
|
||||
}
|
||||
}),
|
||||
join_rule: Some(room_description.join_rule.into()),
|
||||
is_world_readable: Some(room_description.is_world_readable),
|
||||
state: None,
|
||||
is_direct: None,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
//! Helpers to mock an OAuth 2.0 server for the purpose of integration tests.
|
||||
|
||||
use ruma::{
|
||||
api::client::discovery::get_authorization_server_metadata::msc2965::AuthorizationServerMetadata,
|
||||
api::client::discovery::get_authorization_server_metadata::v1::AuthorizationServerMetadata,
|
||||
serde::Raw,
|
||||
};
|
||||
use serde_json::json;
|
||||
|
||||
Reference in New Issue
Block a user