diff --git a/Cargo.lock b/Cargo.lock index 5e26ad28bfc..903e0639b29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3486,7 +3486,7 @@ dependencies = [ "byteorder", "image", "qrcode 0.14.0", - "ruma-common", + "ruma-common 0.13.0 (git+https://github.com/ruma/ruma?rev=75e8829bec0b7bc5332860e1fb2df658d5c71d66)", "thiserror", "vodozemac", ] @@ -5016,13 +5016,13 @@ dependencies = [ [[package]] name = "ruma" version = "0.10.1" -source = "git+https://github.com/ruma/ruma?rev=75e8829bec0b7bc5332860e1fb2df658d5c71d66#75e8829bec0b7bc5332860e1fb2df658d5c71d66" +source = "git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740#61b2e3c1304e394e7ab11b83de5a3520fea61740" dependencies = [ "assign", "js_int", "js_option", "ruma-client-api", - "ruma-common", + "ruma-common 0.13.0 (git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740)", "ruma-events", "ruma-federation-api", "ruma-html", @@ -5033,7 +5033,7 @@ dependencies = [ [[package]] name = "ruma-client-api" version = "0.18.0" -source = "git+https://github.com/ruma/ruma?rev=75e8829bec0b7bc5332860e1fb2df658d5c71d66#75e8829bec0b7bc5332860e1fb2df658d5c71d66" +source = "git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740#61b2e3c1304e394e7ab11b83de5a3520fea61740" dependencies = [ "as_variant", "assign", @@ -5043,7 +5043,7 @@ dependencies = [ "js_int", "js_option", "maplit", - "ruma-common", + "ruma-common 0.13.0 (git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740)", "ruma-events", "serde", "serde_html_form", @@ -5056,7 +5056,7 @@ dependencies = [ [[package]] name = "ruma-common" version = "0.13.0" -source = "git+https://github.com/ruma/ruma?rev=75e8829bec0b7bc5332860e1fb2df658d5c71d66#75e8829bec0b7bc5332860e1fb2df658d5c71d66" +source = "git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740#61b2e3c1304e394e7ab11b83de5a3520fea61740" dependencies = [ "as_variant", "base64 0.22.1", @@ -5071,8 +5071,8 @@ dependencies = [ "percent-encoding", "rand", "regex", - "ruma-identifiers-validation", - "ruma-macros", + "ruma-identifiers-validation 0.9.5 (git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740)", + "ruma-macros 0.13.0 (git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740)", "serde", "serde_html_form", "serde_json", @@ -5085,10 +5085,36 @@ dependencies = [ "wildmatch", ] +[[package]] +name = "ruma-common" +version = "0.13.0" +source = "git+https://github.com/ruma/ruma?rev=75e8829bec0b7bc5332860e1fb2df658d5c71d66#75e8829bec0b7bc5332860e1fb2df658d5c71d66" +dependencies = [ + "as_variant", + "base64 0.22.1", + "bytes", + "form_urlencoded", + "indexmap 2.2.6", + "js_int", + "percent-encoding", + "regex", + "ruma-identifiers-validation 0.9.5 (git+https://github.com/ruma/ruma?rev=75e8829bec0b7bc5332860e1fb2df658d5c71d66)", + "ruma-macros 0.13.0 (git+https://github.com/ruma/ruma?rev=75e8829bec0b7bc5332860e1fb2df658d5c71d66)", + "serde", + "serde_html_form", + "serde_json", + "thiserror", + "time", + "tracing", + "url", + "web-time", + "wildmatch", +] + [[package]] name = "ruma-events" version = "0.28.1" -source = "git+https://github.com/ruma/ruma?rev=75e8829bec0b7bc5332860e1fb2df658d5c71d66#75e8829bec0b7bc5332860e1fb2df658d5c71d66" +source = "git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740#61b2e3c1304e394e7ab11b83de5a3520fea61740" dependencies = [ "as_variant", "indexmap 2.2.6", @@ -5097,10 +5123,10 @@ dependencies = [ "percent-encoding", "pulldown-cmark", "regex", - "ruma-common", + "ruma-common 0.13.0 (git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740)", "ruma-html", - "ruma-identifiers-validation", - "ruma-macros", + "ruma-identifiers-validation 0.9.5 (git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740)", + "ruma-macros 0.13.0 (git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740)", "serde", "serde_json", "thiserror", @@ -5112,10 +5138,10 @@ dependencies = [ [[package]] name = "ruma-federation-api" version = "0.9.0" -source = "git+https://github.com/ruma/ruma?rev=75e8829bec0b7bc5332860e1fb2df658d5c71d66#75e8829bec0b7bc5332860e1fb2df658d5c71d66" +source = "git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740#61b2e3c1304e394e7ab11b83de5a3520fea61740" dependencies = [ "js_int", - "ruma-common", + "ruma-common 0.13.0 (git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740)", "ruma-events", "serde", "serde_json", @@ -5124,7 +5150,7 @@ dependencies = [ [[package]] name = "ruma-html" version = "0.2.0" -source = "git+https://github.com/ruma/ruma?rev=75e8829bec0b7bc5332860e1fb2df658d5c71d66#75e8829bec0b7bc5332860e1fb2df658d5c71d66" +source = "git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740#61b2e3c1304e394e7ab11b83de5a3520fea61740" dependencies = [ "as_variant", "html5ever", @@ -5133,6 +5159,15 @@ dependencies = [ "wildmatch", ] +[[package]] +name = "ruma-identifiers-validation" +version = "0.9.5" +source = "git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740#61b2e3c1304e394e7ab11b83de5a3520fea61740" +dependencies = [ + "js_int", + "thiserror", +] + [[package]] name = "ruma-identifiers-validation" version = "0.9.5" @@ -5142,6 +5177,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "ruma-macros" +version = "0.13.0" +source = "git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740#61b2e3c1304e394e7ab11b83de5a3520fea61740" +dependencies = [ + "once_cell", + "proc-macro-crate", + "proc-macro2", + "quote", + "ruma-identifiers-validation 0.9.5 (git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740)", + "serde", + "syn 2.0.63", + "toml 0.8.12", +] + [[package]] name = "ruma-macros" version = "0.13.0" @@ -5151,7 +5201,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "ruma-identifiers-validation", + "ruma-identifiers-validation 0.9.5 (git+https://github.com/ruma/ruma?rev=75e8829bec0b7bc5332860e1fb2df658d5c71d66)", "serde", "syn 2.0.63", "toml 0.8.12", @@ -5160,10 +5210,10 @@ dependencies = [ [[package]] name = "ruma-push-gateway-api" version = "0.9.0" -source = "git+https://github.com/ruma/ruma?rev=75e8829bec0b7bc5332860e1fb2df658d5c71d66#75e8829bec0b7bc5332860e1fb2df658d5c71d66" +source = "git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740#61b2e3c1304e394e7ab11b83de5a3520fea61740" dependencies = [ "js_int", - "ruma-common", + "ruma-common 0.13.0 (git+https://github.com/toger5/ruma/?rev=61b2e3c1304e394e7ab11b83de5a3520fea61740)", "ruma-events", "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index 2ac19dfd954..485bfcb01c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,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 = "75e8829bec0b7bc5332860e1fb2df658d5c71d66", features = [ +ruma = { git = "https://github.com/toger5/ruma/", rev = "61b2e3c1304e394e7ab11b83de5a3520fea61740", features = [ "client-api-c", "compat-upload-signatures", "compat-user-id", diff --git a/bindings/matrix-sdk-ffi/src/room.rs b/bindings/matrix-sdk-ffi/src/room.rs index 90a4531edb7..e14aeb26ad8 100644 --- a/bindings/matrix-sdk-ffi/src/room.rs +++ b/bindings/matrix-sdk-ffi/src/room.rs @@ -134,7 +134,7 @@ impl Room { /// Returns a Vec of userId's that participate in the room call. /// - /// matrix_rtc memberships with application "m.call" and scope "m.room" are + /// MatrixRTC memberships with application "m.call" and scope "m.room" are /// considered. A user can occur twice if they join with two devices. /// convert to a set depending if the different users are required or the /// amount of sessions. diff --git a/crates/matrix-sdk-base/src/rooms/normal.rs b/crates/matrix-sdk-base/src/rooms/normal.rs index 0c0b5d996ca..2404deea5f6 100644 --- a/crates/matrix-sdk-base/src/rooms/normal.rs +++ b/crates/matrix-sdk-base/src/rooms/normal.rs @@ -29,7 +29,7 @@ use ruma::events::AnySyncTimelineEvent; use ruma::{ api::client::sync::sync_events::v3::RoomSummary as RumaSummary, events::{ - call::member::Membership, + call::member::MembershipData, ignored_user_list::IgnoredUserListEventContent, receipt::{Receipt, ReceiptThread, ReceiptType}, room::{ @@ -462,7 +462,7 @@ impl Room { /// Returns a Vec of userId's that participate in the room call. /// - /// matrix_rtc memberships with application "m.call" and scope "m.room" are + /// MatrixRTC memberships with application "m.call" and scope "m.room" are /// considered. A user can occur twice if they join with two devices. /// convert to a set depending if the different users are required or the /// amount of sessions. @@ -1289,7 +1289,7 @@ impl RoomInfo { /// associated UserId's in this room. /// /// The vector is ordered by oldest membership to newest. - fn active_matrix_rtc_memberships(&self) -> Vec<(OwnedUserId, &Membership)> { + fn active_matrix_rtc_memberships(&self) -> Vec<(OwnedUserId, MembershipData<'_>)> { let mut v = self .base_info .rtc_member @@ -1304,7 +1304,7 @@ impl RoomInfo { }) .flatten() .collect::>(); - v.sort_by_key(|(_, m)| m.created_ts); + v.sort_by_key(|(_, m)| m.created_ts()); v } @@ -1313,7 +1313,7 @@ impl RoomInfo { /// returns Memberships with application "m.call" and scope "m.room". /// /// The vector is ordered by oldest membership user to newest. - fn active_room_call_memberships(&self) -> Vec<(OwnedUserId, &Membership)> { + fn active_room_call_memberships(&self) -> Vec<(OwnedUserId, MembershipData<'_>)> { self.active_matrix_rtc_memberships() .into_iter() .filter(|(_user_id, m)| m.is_room_call()) @@ -1484,9 +1484,10 @@ mod tests { use ruma::{ api::client::sync::sync_events::v3::RoomSummary as RumaSummary, events::{ - call::member::{ - Application, CallApplicationContent, CallMemberEventContent, Focus, LivekitFocus, - Membership, MembershipInit, OriginalSyncCallMemberEvent, + call::{ + focus::{Focus, LivekitFocus}, + Application, CallApplicationContent, CallMemberEventContent, LegacyMembershipData, + MembershipInit, OriginalSyncCallMemberEvent, }, room::{ canonical_alias::RoomCanonicalAliasEventContent, @@ -2341,11 +2342,11 @@ mod tests { } fn call_member_state_event( - memberships: Vec, + memberships: Vec, ev_id: &str, user_id: &UserId, ) -> AnySyncStateEvent { - let content = CallMemberEventContent::new(memberships); + let content = CallMemberEventContent::new_legacy(memberships); AnySyncStateEvent::CallMember(SyncStateEvent::Original(OriginalSyncCallMemberEvent { content, @@ -2363,7 +2364,7 @@ mod tests { device_id: &str, membership_id: &str, minutes_ago: u32, - ) -> Membership { + ) -> LegacyMembershipData { let application = Application::Call(CallApplicationContent::new( "my_call_id_1".to_owned(), ruma::events::call::member::CallScope::Room, @@ -2374,7 +2375,7 @@ mod tests { ))]; assign!( - Membership::from(MembershipInit { + LegacyMembershipData::from(MembershipInit { application, device_id: device_id.to_owned(), expires: Duration::from_millis(3_600_000),