From 46e244a0ef520dc8df21232c39050d7d8c70bd15 Mon Sep 17 00:00:00 2001 From: Henry-Hiles Date: Sat, 5 Dec 2026 19:10:47 -0500 Subject: [PATCH] feat: Copy m.rtc.slot state events during room upgrades --- Cargo.lock | 24 +++++++++---------- Cargo.toml | 2 +- .../+rtc-slot-room-upgrades.feature.md | 1 + src/api/client/room/upgrade.rs | 3 ++- 4 files changed, 16 insertions(+), 14 deletions(-) create mode 100644 changelog.d/+rtc-slot-room-upgrades.feature.md diff --git a/Cargo.lock b/Cargo.lock index ca3bfecfa..f4d5ecdf2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -503,7 +503,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.119", + "syn 3.0.10", ] [[package]] @@ -5049,7 +5049,7 @@ dependencies = [ [[package]] name = "ruma" version = "0.18.0" -source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86" +source = "git+https://github.com/ruma/ruma.git?rev=d629f1ed91c1d8598c7f6c49e666c676feacbfc4#d629f1ed91c1d8598c7f6c49e666c676feacbfc4" dependencies = [ "assign", "js_int", @@ -5068,7 +5068,7 @@ dependencies = [ [[package]] name = "ruma-appservice-api" version = "0.18.0" -source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86" +source = "git+https://github.com/ruma/ruma.git?rev=d629f1ed91c1d8598c7f6c49e666c676feacbfc4#d629f1ed91c1d8598c7f6c49e666c676feacbfc4" dependencies = [ "http", "js_int", @@ -5081,7 +5081,7 @@ dependencies = [ [[package]] name = "ruma-client-api" version = "0.26.0" -source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86" +source = "git+https://github.com/ruma/ruma.git?rev=d629f1ed91c1d8598c7f6c49e666c676feacbfc4#d629f1ed91c1d8598c7f6c49e666c676feacbfc4" dependencies = [ "as_variant", "assign", @@ -5103,7 +5103,7 @@ dependencies = [ [[package]] name = "ruma-common" version = "0.21.0" -source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86" +source = "git+https://github.com/ruma/ruma.git?rev=d629f1ed91c1d8598c7f6c49e666c676feacbfc4#d629f1ed91c1d8598c7f6c49e666c676feacbfc4" dependencies = [ "as_variant", "base64 0.23.1", @@ -5136,7 +5136,7 @@ dependencies = [ [[package]] name = "ruma-events" version = "0.36.0" -source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86" +source = "git+https://github.com/ruma/ruma.git?rev=d629f1ed91c1d8598c7f6c49e666c676feacbfc4#d629f1ed91c1d8598c7f6c49e666c676feacbfc4" dependencies = [ "as_variant", "indexmap 2.14.2", @@ -5157,7 +5157,7 @@ dependencies = [ [[package]] name = "ruma-federation-api" version = "0.17.0" -source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86" +source = "git+https://github.com/ruma/ruma.git?rev=d629f1ed91c1d8598c7f6c49e666c676feacbfc4#d629f1ed91c1d8598c7f6c49e666c676feacbfc4" dependencies = [ "bytes", "http", @@ -5179,7 +5179,7 @@ dependencies = [ [[package]] name = "ruma-identifiers-validation" version = "0.14.1" -source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86" +source = "git+https://github.com/ruma/ruma.git?rev=d629f1ed91c1d8598c7f6c49e666c676feacbfc4#d629f1ed91c1d8598c7f6c49e666c676feacbfc4" dependencies = [ "js_int", "thiserror 2.0.21", @@ -5188,7 +5188,7 @@ dependencies = [ [[package]] name = "ruma-macros" version = "0.20.3" -source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86" +source = "git+https://github.com/ruma/ruma.git?rev=d629f1ed91c1d8598c7f6c49e666c676feacbfc4#d629f1ed91c1d8598c7f6c49e666c676feacbfc4" dependencies = [ "as_variant", "cfg-if", @@ -5204,7 +5204,7 @@ dependencies = [ [[package]] name = "ruma-push-gateway-api" version = "0.17.0" -source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86" +source = "git+https://github.com/ruma/ruma.git?rev=d629f1ed91c1d8598c7f6c49e666c676feacbfc4#d629f1ed91c1d8598c7f6c49e666c676feacbfc4" dependencies = [ "js_int", "ruma-common", @@ -5216,7 +5216,7 @@ dependencies = [ [[package]] name = "ruma-signatures" version = "0.23.0" -source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86" +source = "git+https://github.com/ruma/ruma.git?rev=d629f1ed91c1d8598c7f6c49e666c676feacbfc4#d629f1ed91c1d8598c7f6c49e666c676feacbfc4" dependencies = [ "base64 0.23.1", "ed25519-dalek", @@ -5233,7 +5233,7 @@ dependencies = [ [[package]] name = "ruma-state-res" version = "0.19.0" -source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86" +source = "git+https://github.com/ruma/ruma.git?rev=d629f1ed91c1d8598c7f6c49e666c676feacbfc4#d629f1ed91c1d8598c7f6c49e666c676feacbfc4" dependencies = [ "js_int", "ruma-common", diff --git a/Cargo.toml b/Cargo.toml index 18af0765c..3a63248e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -357,7 +357,7 @@ version = "1.1.1" # Used for matrix spec type definitions and helpers [workspace.dependencies.ruma] git = "https://github.com/ruma/ruma.git" -rev = "d6621e1355419c5ef9a7c260b28ae1c0e6722b86" +rev = "d629f1ed91c1d8598c7f6c49e666c676feacbfc4" features = [ "appservice-api-c", "client-api", diff --git a/changelog.d/+rtc-slot-room-upgrades.feature.md b/changelog.d/+rtc-slot-room-upgrades.feature.md new file mode 100644 index 000000000..342999fa3 --- /dev/null +++ b/changelog.d/+rtc-slot-room-upgrades.feature.md @@ -0,0 +1 @@ +MatrixRTC `m.rtc.slot` state events ([MSC4143](https://github.com/matrix-org/matrix-spec-proposals/pull/4143)) are now copied to the new room during room upgrades. Contributed by @Henry-Hiles. diff --git a/src/api/client/room/upgrade.rs b/src/api/client/room/upgrade.rs index 1d4a623f1..60c6a6e11 100644 --- a/src/api/client/room/upgrade.rs +++ b/src/api/client/room/upgrade.rs @@ -31,7 +31,7 @@ use serde_json::value::to_raw_value; use crate::router::Ruma; /// Recommended transferable state events list from the spec -const TRANSFERABLE_STATE_EVENTS: &[StateEventType; 11] = &[ +const TRANSFERABLE_STATE_EVENTS: &[StateEventType; 12] = &[ StateEventType::RoomServerAcl, StateEventType::RoomEncryption, StateEventType::RoomName, @@ -43,6 +43,7 @@ const TRANSFERABLE_STATE_EVENTS: &[StateEventType; 11] = &[ StateEventType::RoomPowerLevels, StateEventType::SpaceParent, StateEventType::SpaceChild, + StateEventType::RtcSlot, ]; /// Updates spaces that are marked as parents of old_room_id to instead point to