From afe9f7a979982a392faf91df05514ce2da486fef Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 24 Jul 2025 17:20:32 +0200 Subject: [PATCH] chore: upgrade ruma for msc4306 --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 4 ++-- crates/matrix-sdk/src/room/mod.rs | 13 ++++++++----- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ede4f63de..f1f201ef2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4483,7 +4483,7 @@ dependencies = [ [[package]] name = "ruma" version = "0.12.5" -source = "git+https://github.com/ruma/ruma?rev=de19ebaf71af620eb17abaefd92e43153f9d041d#de19ebaf71af620eb17abaefd92e43153f9d041d" +source = "git+https://github.com/ruma/ruma?rev=184d4f85b201bc1e932a8344d78575e826f31efa#184d4f85b201bc1e932a8344d78575e826f31efa" dependencies = [ "assign", "js_int", @@ -4499,7 +4499,7 @@ dependencies = [ [[package]] name = "ruma-client-api" version = "0.20.4" -source = "git+https://github.com/ruma/ruma?rev=de19ebaf71af620eb17abaefd92e43153f9d041d#de19ebaf71af620eb17abaefd92e43153f9d041d" +source = "git+https://github.com/ruma/ruma?rev=184d4f85b201bc1e932a8344d78575e826f31efa#184d4f85b201bc1e932a8344d78575e826f31efa" dependencies = [ "as_variant", "assign", @@ -4522,7 +4522,7 @@ dependencies = [ [[package]] name = "ruma-common" version = "0.15.4" -source = "git+https://github.com/ruma/ruma?rev=de19ebaf71af620eb17abaefd92e43153f9d041d#de19ebaf71af620eb17abaefd92e43153f9d041d" +source = "git+https://github.com/ruma/ruma?rev=184d4f85b201bc1e932a8344d78575e826f31efa#184d4f85b201bc1e932a8344d78575e826f31efa" dependencies = [ "as_variant", "base64", @@ -4555,7 +4555,7 @@ dependencies = [ [[package]] name = "ruma-events" version = "0.30.4" -source = "git+https://github.com/ruma/ruma?rev=de19ebaf71af620eb17abaefd92e43153f9d041d#de19ebaf71af620eb17abaefd92e43153f9d041d" +source = "git+https://github.com/ruma/ruma?rev=184d4f85b201bc1e932a8344d78575e826f31efa#184d4f85b201bc1e932a8344d78575e826f31efa" dependencies = [ "as_variant", "indexmap", @@ -4581,7 +4581,7 @@ dependencies = [ [[package]] name = "ruma-federation-api" version = "0.11.2" -source = "git+https://github.com/ruma/ruma?rev=de19ebaf71af620eb17abaefd92e43153f9d041d#de19ebaf71af620eb17abaefd92e43153f9d041d" +source = "git+https://github.com/ruma/ruma?rev=184d4f85b201bc1e932a8344d78575e826f31efa#184d4f85b201bc1e932a8344d78575e826f31efa" dependencies = [ "headers", "http", @@ -4599,7 +4599,7 @@ dependencies = [ [[package]] name = "ruma-html" version = "0.4.1" -source = "git+https://github.com/ruma/ruma?rev=de19ebaf71af620eb17abaefd92e43153f9d041d#de19ebaf71af620eb17abaefd92e43153f9d041d" +source = "git+https://github.com/ruma/ruma?rev=184d4f85b201bc1e932a8344d78575e826f31efa#184d4f85b201bc1e932a8344d78575e826f31efa" dependencies = [ "as_variant", "html5ever", @@ -4610,7 +4610,7 @@ dependencies = [ [[package]] name = "ruma-identifiers-validation" version = "0.10.1" -source = "git+https://github.com/ruma/ruma?rev=de19ebaf71af620eb17abaefd92e43153f9d041d#de19ebaf71af620eb17abaefd92e43153f9d041d" +source = "git+https://github.com/ruma/ruma?rev=184d4f85b201bc1e932a8344d78575e826f31efa#184d4f85b201bc1e932a8344d78575e826f31efa" dependencies = [ "js_int", "thiserror 2.0.11", @@ -4619,7 +4619,7 @@ dependencies = [ [[package]] name = "ruma-macros" version = "0.15.2" -source = "git+https://github.com/ruma/ruma?rev=de19ebaf71af620eb17abaefd92e43153f9d041d#de19ebaf71af620eb17abaefd92e43153f9d041d" +source = "git+https://github.com/ruma/ruma?rev=184d4f85b201bc1e932a8344d78575e826f31efa#184d4f85b201bc1e932a8344d78575e826f31efa" dependencies = [ "cfg-if", "proc-macro-crate", diff --git a/Cargo.toml b/Cargo.toml index 5435d5d42..0756a2c2e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,7 +59,7 @@ proptest = { version = "1.6.0", default-features = false, features = ["std"] } rand = "0.8.5" reqwest = { version = "0.12.12", default-features = false } rmp-serde = "1.3.0" -ruma = { git = "https://github.com/ruma/ruma", rev = "de19ebaf71af620eb17abaefd92e43153f9d041d", features = [ +ruma = { git = "https://github.com/ruma/ruma", rev = "184d4f85b201bc1e932a8344d78575e826f31efa", features = [ "client-api-c", "compat-upload-signatures", "compat-arbitrary-length-ids", @@ -77,7 +77,7 @@ ruma = { git = "https://github.com/ruma/ruma", rev = "de19ebaf71af620eb17abaefd9 "unstable-msc4278", "unstable-msc4286", ] } -ruma-common = { git = "https://github.com/ruma/ruma", rev = "de19ebaf71af620eb17abaefd92e43153f9d041d" } +ruma-common = { git = "https://github.com/ruma/ruma", rev = "184d4f85b201bc1e932a8344d78575e826f31efa" } sentry = "0.36.0" sentry-tracing = "0.36.0" serde = { version = "1.0.217", features = ["rc"] } diff --git a/crates/matrix-sdk/src/room/mod.rs b/crates/matrix-sdk/src/room/mod.rs index a6d5e0ed9..e782fc24f 100644 --- a/crates/matrix-sdk/src/room/mod.rs +++ b/crates/matrix-sdk/src/room/mod.rs @@ -78,7 +78,7 @@ use ruma::{ receipt::create_receipt, redact::redact_event, room::{get_room_event, report_content, report_room}, - state::{get_state_events_for_key, send_state_event}, + state::{get_state_event_for_key, send_state_event}, tag::{create_tag, delete_tag}, typing::create_typing_event::{self, v3::Typing}, }, @@ -814,7 +814,7 @@ impl Room { .encryption_state_deduplicated_handler .run(self.room_id().to_owned(), async move { // Request the event from the server. - let request = get_state_events_for_key::v3::Request::new( + let request = get_state_event_for_key::v3::Request::new( self.room_id().to_owned(), StateEventType::RoomEncryption, "".to_owned(), @@ -822,7 +822,7 @@ impl Room { let response = match self.client.send(request).await { Ok(response) => Some( response - .content + .into_content() .deserialize_as_unchecked::()?, ), Err(err) if err.client_api_error_kind() == Some(&ErrorKind::NotFound) => None, @@ -3490,7 +3490,7 @@ impl Room { pub async fn load_pinned_events(&self) -> Result>> { let response = self .client - .send(get_state_events_for_key::v3::Request::new( + .send(get_state_event_for_key::v3::Request::new( self.room_id().to_owned(), StateEventType::RoomPinnedEvents, "".to_owned(), @@ -3499,7 +3499,10 @@ impl Room { match response { Ok(response) => Ok(Some( - response.content.deserialize_as_unchecked::()?.pinned, + response + .into_content() + .deserialize_as_unchecked::()? + .pinned, )), Err(http_error) => match http_error.as_client_api_error() { Some(error) if error.status_code == StatusCode::NOT_FOUND => Ok(None),