From 26a8a1783496629091ef870880d1a668665b42bb Mon Sep 17 00:00:00 2001 From: Doug Date: Mon, 7 Oct 2024 11:23:42 +0100 Subject: [PATCH] chore: Update Ruma to add media caption methods. --- Cargo.lock | 26 +++++++++---------- Cargo.toml | 6 ++--- bindings/matrix-sdk-ffi/src/room_list.rs | 4 +-- .../matrix-sdk-ui/src/notification_client.rs | 2 +- .../src/sliding_sync/list/sticky.rs | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d5b99265047..5bf59be5e26 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2264,9 +2264,9 @@ dependencies = [ [[package]] name = "html5ever" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ff6858c1f7e2a470c5403091866fa95b36fe0dbac5d771f932c15e5ff1ee501" +checksum = "2e15626aaf9c351bc696217cbe29cb9b5e86c43f8a46b5e2f5c6c5cf7cb904ce" dependencies = [ "log", "mac", @@ -2950,9 +2950,9 @@ checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" [[package]] name = "markup5ever" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d581ff8be69d08a2efa23a959d81aa22b739073f749f067348bd4f4ba4b69195" +checksum = "82c88c6129bd24319e62a0359cb6b958fa7e8be6e19bb1663bc396b90883aca5" dependencies = [ "log", "phf", @@ -4965,7 +4965,7 @@ dependencies = [ [[package]] name = "ruma" version = "0.10.1" -source = "git+https://github.com/ruma/ruma?rev=1ae98db9c44f46a590f4c76baf5cef70ebb6970d#1ae98db9c44f46a590f4c76baf5cef70ebb6970d" +source = "git+https://github.com/ruma/ruma?rev=b1c9a32f26f7aa76e20f96dbbb113250ed979112#b1c9a32f26f7aa76e20f96dbbb113250ed979112" dependencies = [ "assign", "js_int", @@ -4982,7 +4982,7 @@ dependencies = [ [[package]] name = "ruma-client-api" version = "0.18.0" -source = "git+https://github.com/ruma/ruma?rev=1ae98db9c44f46a590f4c76baf5cef70ebb6970d#1ae98db9c44f46a590f4c76baf5cef70ebb6970d" +source = "git+https://github.com/ruma/ruma?rev=b1c9a32f26f7aa76e20f96dbbb113250ed979112#b1c9a32f26f7aa76e20f96dbbb113250ed979112" dependencies = [ "as_variant", "assign", @@ -5005,7 +5005,7 @@ dependencies = [ [[package]] name = "ruma-common" version = "0.13.0" -source = "git+https://github.com/ruma/ruma?rev=1ae98db9c44f46a590f4c76baf5cef70ebb6970d#1ae98db9c44f46a590f4c76baf5cef70ebb6970d" +source = "git+https://github.com/ruma/ruma?rev=b1c9a32f26f7aa76e20f96dbbb113250ed979112#b1c9a32f26f7aa76e20f96dbbb113250ed979112" dependencies = [ "as_variant", "base64 0.22.1", @@ -5037,7 +5037,7 @@ dependencies = [ [[package]] name = "ruma-events" version = "0.28.1" -source = "git+https://github.com/ruma/ruma?rev=1ae98db9c44f46a590f4c76baf5cef70ebb6970d#1ae98db9c44f46a590f4c76baf5cef70ebb6970d" +source = "git+https://github.com/ruma/ruma?rev=b1c9a32f26f7aa76e20f96dbbb113250ed979112#b1c9a32f26f7aa76e20f96dbbb113250ed979112" dependencies = [ "as_variant", "indexmap 2.6.0", @@ -5062,7 +5062,7 @@ dependencies = [ [[package]] name = "ruma-federation-api" version = "0.9.0" -source = "git+https://github.com/ruma/ruma?rev=1ae98db9c44f46a590f4c76baf5cef70ebb6970d#1ae98db9c44f46a590f4c76baf5cef70ebb6970d" +source = "git+https://github.com/ruma/ruma?rev=b1c9a32f26f7aa76e20f96dbbb113250ed979112#b1c9a32f26f7aa76e20f96dbbb113250ed979112" dependencies = [ "http", "js_int", @@ -5076,7 +5076,7 @@ dependencies = [ [[package]] name = "ruma-html" version = "0.2.0" -source = "git+https://github.com/ruma/ruma?rev=1ae98db9c44f46a590f4c76baf5cef70ebb6970d#1ae98db9c44f46a590f4c76baf5cef70ebb6970d" +source = "git+https://github.com/ruma/ruma?rev=b1c9a32f26f7aa76e20f96dbbb113250ed979112#b1c9a32f26f7aa76e20f96dbbb113250ed979112" dependencies = [ "as_variant", "html5ever", @@ -5088,7 +5088,7 @@ dependencies = [ [[package]] name = "ruma-identifiers-validation" version = "0.9.5" -source = "git+https://github.com/ruma/ruma?rev=1ae98db9c44f46a590f4c76baf5cef70ebb6970d#1ae98db9c44f46a590f4c76baf5cef70ebb6970d" +source = "git+https://github.com/ruma/ruma?rev=b1c9a32f26f7aa76e20f96dbbb113250ed979112#b1c9a32f26f7aa76e20f96dbbb113250ed979112" dependencies = [ "js_int", "thiserror", @@ -5097,7 +5097,7 @@ dependencies = [ [[package]] name = "ruma-macros" version = "0.13.0" -source = "git+https://github.com/ruma/ruma?rev=1ae98db9c44f46a590f4c76baf5cef70ebb6970d#1ae98db9c44f46a590f4c76baf5cef70ebb6970d" +source = "git+https://github.com/ruma/ruma?rev=b1c9a32f26f7aa76e20f96dbbb113250ed979112#b1c9a32f26f7aa76e20f96dbbb113250ed979112" dependencies = [ "cfg-if", "once_cell", @@ -5113,7 +5113,7 @@ dependencies = [ [[package]] name = "ruma-push-gateway-api" version = "0.9.0" -source = "git+https://github.com/ruma/ruma?rev=1ae98db9c44f46a590f4c76baf5cef70ebb6970d#1ae98db9c44f46a590f4c76baf5cef70ebb6970d" +source = "git+https://github.com/ruma/ruma?rev=b1c9a32f26f7aa76e20f96dbbb113250ed979112#b1c9a32f26f7aa76e20f96dbbb113250ed979112" dependencies = [ "js_int", "ruma-common", diff --git a/Cargo.toml b/Cargo.toml index b83c6155104..f7cfc849063 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ once_cell = "1.16.0" pin-project-lite = "0.2.9" rand = "0.8.5" reqwest = { version = "0.12.4", default-features = false } -ruma = { git = "https://github.com/ruma/ruma", rev = "1ae98db9c44f46a590f4c76baf5cef70ebb6970d", features = [ +ruma = { git = "https://github.com/ruma/ruma", rev = "b1c9a32f26f7aa76e20f96dbbb113250ed979112", features = [ "client-api-c", "compat-upload-signatures", "compat-user-id", @@ -61,7 +61,7 @@ ruma = { git = "https://github.com/ruma/ruma", rev = "1ae98db9c44f46a590f4c76baf "unstable-msc4075", "unstable-msc4140", ] } -ruma-common = { git = "https://github.com/ruma/ruma", rev = "1ae98db9c44f46a590f4c76baf5cef70ebb6970d" } +ruma-common = { git = "https://github.com/ruma/ruma", rev = "b1c9a32f26f7aa76e20f96dbbb113250ed979112" } serde = "1.0.151" serde_html_form = "0.2.0" serde_json = "1.0.91" @@ -123,7 +123,7 @@ opt-level = 3 async-compat = { git = "https://github.com/jplatte/async-compat", rev = "16dc8597ec09a6102d58d4e7b67714a35dd0ecb8" } const_panic = { git = "https://github.com/jplatte/const_panic", rev = "9024a4cb3eac45c1d2d980f17aaee287b17be498" } # Needed to fix rotation log issue on Android (https://github.com/tokio-rs/tracing/issues/2937) -tracing = { git = "https://github.com/element-hq/tracing.git", rev = "ca9431f74d37c9d3b5e6a9f35b2c706711dab7dd"} +tracing = { git = "https://github.com/element-hq/tracing.git", rev = "ca9431f74d37c9d3b5e6a9f35b2c706711dab7dd" } tracing-core = { git = "https://github.com/element-hq/tracing.git", rev = "ca9431f74d37c9d3b5e6a9f35b2c706711dab7dd" } tracing-subscriber = { git = "https://github.com/element-hq/tracing.git", rev = "ca9431f74d37c9d3b5e6a9f35b2c706711dab7dd" } tracing-appender = { git = "https://github.com/element-hq/tracing.git", rev = "ca9431f74d37c9d3b5e6a9f35b2c706711dab7dd" } diff --git a/bindings/matrix-sdk-ffi/src/room_list.rs b/bindings/matrix-sdk-ffi/src/room_list.rs index 7b518ec93b5..2f6f749c80f 100644 --- a/bindings/matrix-sdk-ffi/src/room_list.rs +++ b/bindings/matrix-sdk-ffi/src/room_list.rs @@ -716,7 +716,7 @@ pub struct RequiredState { #[derive(uniffi::Record)] pub struct RoomSubscription { pub required_state: Option>, - pub timeline_limit: Option, + pub timeline_limit: u32, pub include_heroes: Option, } @@ -726,7 +726,7 @@ impl From for http::request::RoomSubscription { required_state: val.required_state.map(|r| r.into_iter().map(|s| (s.key.into(), s.value)).collect() ).unwrap_or_default(), - timeline_limit: val.timeline_limit.map(|u| u.into()), + timeline_limit: val.timeline_limit.into(), include_heroes: val.include_heroes, }) } diff --git a/crates/matrix-sdk-ui/src/notification_client.rs b/crates/matrix-sdk-ui/src/notification_client.rs index 1de35dfab59..f4774ec23f5 100644 --- a/crates/matrix-sdk-ui/src/notification_client.rs +++ b/crates/matrix-sdk-ui/src/notification_client.rs @@ -425,7 +425,7 @@ impl NotificationClient { &[room_id], Some(assign!(http::request::RoomSubscription::default(), { required_state, - timeline_limit: Some(uint!(16)) + timeline_limit: uint!(16) })), true, ); diff --git a/crates/matrix-sdk/src/sliding_sync/list/sticky.rs b/crates/matrix-sdk/src/sliding_sync/list/sticky.rs index ff6adb4f833..b0cb0bcdd1a 100644 --- a/crates/matrix-sdk/src/sliding_sync/list/sticky.rs +++ b/crates/matrix-sdk/src/sliding_sync/list/sticky.rs @@ -50,7 +50,7 @@ impl StickyData for SlidingSyncListStickyParameters { fn apply(&self, request: &mut Self::Request) { request.room_details.required_state = self.required_state.to_vec(); - request.room_details.timeline_limit = Some(self.timeline_limit.into()); + request.room_details.timeline_limit = self.timeline_limit.into(); request.include_heroes = self.include_heroes; request.filters = self.filters.clone(); }