diff --git a/bindings/matrix-sdk-ffi/CHANGELOG.md b/bindings/matrix-sdk-ffi/CHANGELOG.md index 664ac6fdd22..96f77b27651 100644 --- a/bindings/matrix-sdk-ffi/CHANGELOG.md +++ b/bindings/matrix-sdk-ffi/CHANGELOG.md @@ -8,6 +8,9 @@ All notable changes to this project will be documented in this file. ### Breaking changes: +- The `event_id` field of `PredecessorRoom` was removed, due to its removal in the Matrix + specification with MSC4291. + ([#5419](https://github.com/matrix-org/matrix-rust-sdk/pull/5419)) - `Client::url_for_oidc` now allows requesting additional scopes for the OAuth2 authorization code grant. ([#5395](https://github.com/matrix-org/matrix-rust-sdk/pull/5395)) - `Client::url_for_oidc` now allows passing an optional existing device id from a previous login call. diff --git a/bindings/matrix-sdk-ffi/src/room/mod.rs b/bindings/matrix-sdk-ffi/src/room/mod.rs index ab6aa80f79a..a22909f6b4a 100644 --- a/bindings/matrix-sdk-ffi/src/room/mod.rs +++ b/bindings/matrix-sdk-ffi/src/room/mod.rs @@ -1504,13 +1504,10 @@ impl From for SuccessorRoom { pub struct PredecessorRoom { /// The ID of the replacement room. pub room_id: String, - - /// The event ID of the last known event in the predecesssor room. - pub last_event_id: String, } impl From for PredecessorRoom { fn from(value: SdkPredecessorRoom) -> Self { - Self { room_id: value.room_id.to_string(), last_event_id: value.last_event_id.to_string() } + Self { room_id: value.room_id.to_string() } } } diff --git a/crates/matrix-sdk-base/CHANGELOG.md b/crates/matrix-sdk-base/CHANGELOG.md index 35e3964e78a..b1232f81971 100644 --- a/crates/matrix-sdk-base/CHANGELOG.md +++ b/crates/matrix-sdk-base/CHANGELOG.md @@ -15,6 +15,11 @@ All notable changes to this project will be documented in this file. inviter. ([#5390](https://github.com/matrix-org/matrix-rust-sdk/pull/5390)) +### Refactor +- [**breaking**] The `event_id` field of `PredecessorRoom` was removed, due to + its removal in the Matrix specification with MSC4291. + ([#5419](https://github.com/matrix-org/matrix-rust-sdk/pull/5419)) + ## [0.13.0] - 2025-07-10 ### Features @@ -59,8 +64,8 @@ No notable changes in this release. - `EventCacheStoreMedia` has a new method `last_media_cleanup_time_inner` - There are new `'static` bounds in `MediaService` for the media cache stores - `event_cache::store::MemoryStore` implements `Clone`. -- `BaseClient` now has a `handle_verification_events` field which is `true` by - default and can be negated so the `NotificationClient` won't handle received +- `BaseClient` now has a `handle_verification_events` field which is `true` by + default and can be negated so the `NotificationClient` won't handle received verification events too, causing errors in the `VerificationMachine`. - [**breaking**] `Room::is_encryption_state_synced` has been removed ([#4777](https://github.com/matrix-org/matrix-rust-sdk/pull/4777)) diff --git a/crates/matrix-sdk-base/src/room/tombstone.rs b/crates/matrix-sdk-base/src/room/tombstone.rs index 0a333685361..c285bf2a5aa 100644 --- a/crates/matrix-sdk-base/src/room/tombstone.rs +++ b/crates/matrix-sdk-base/src/room/tombstone.rs @@ -14,7 +14,7 @@ use std::ops::Not; -use ruma::{events::room::tombstone::RoomTombstoneEventContent, OwnedEventId, OwnedRoomId}; +use ruma::{events::room::tombstone::RoomTombstoneEventContent, OwnedRoomId}; use super::Room; @@ -67,12 +67,9 @@ impl Room { /// [`m.room.tombstone`]: https://spec.matrix.org/v1.14/client-server-api/#mroomtombstone /// [`m.room.create`]: https://spec.matrix.org/v1.14/client-server-api/#mroomcreate pub fn predecessor_room(&self) -> Option { - self.create_content().and_then(|content_event| content_event.predecessor).map( - |predecessor| PredecessorRoom { - room_id: predecessor.room_id, - last_event_id: predecessor.event_id, - }, - ) + self.create_content() + .and_then(|content_event| content_event.predecessor) + .map(|predecessor| PredecessorRoom { room_id: predecessor.room_id }) } } @@ -104,9 +101,6 @@ pub struct SuccessorRoom { pub struct PredecessorRoom { /// The ID of the old room. pub room_id: OwnedRoomId, - - /// The event ID of the last known event in the predecesssor room. - pub last_event_id: OwnedEventId, } #[cfg(test)] @@ -252,7 +246,6 @@ mod tests { assert!(room.create_content().is_some()); assert_matches!(room.predecessor_room(), Some(predecessor_room) => { assert_eq!(predecessor_room.room_id, predecessor_room_id); - assert_eq!(predecessor_room.last_event_id, predecessor_last_event_id); }); } }