|
14 | 14 |
|
15 | 15 | use std::ops::Not;
|
16 | 16 |
|
17 |
| -use ruma::{events::room::tombstone::RoomTombstoneEventContent, OwnedEventId, OwnedRoomId}; |
| 17 | +use ruma::{events::room::tombstone::RoomTombstoneEventContent, OwnedRoomId}; |
18 | 18 |
|
19 | 19 | use super::Room;
|
20 | 20 |
|
@@ -67,12 +67,9 @@ impl Room {
|
67 | 67 | /// [`m.room.tombstone`]: https://spec.matrix.org/v1.14/client-server-api/#mroomtombstone
|
68 | 68 | /// [`m.room.create`]: https://spec.matrix.org/v1.14/client-server-api/#mroomcreate
|
69 | 69 | pub fn predecessor_room(&self) -> Option<PredecessorRoom> {
|
70 |
| - self.create_content().and_then(|content_event| content_event.predecessor).map( |
71 |
| - |predecessor| PredecessorRoom { |
72 |
| - room_id: predecessor.room_id, |
73 |
| - last_event_id: predecessor.event_id, |
74 |
| - }, |
75 |
| - ) |
| 70 | + self.create_content() |
| 71 | + .and_then(|content_event| content_event.predecessor) |
| 72 | + .map(|predecessor| PredecessorRoom { room_id: predecessor.room_id }) |
76 | 73 | }
|
77 | 74 | }
|
78 | 75 |
|
@@ -104,9 +101,6 @@ pub struct SuccessorRoom {
|
104 | 101 | pub struct PredecessorRoom {
|
105 | 102 | /// The ID of the old room.
|
106 | 103 | pub room_id: OwnedRoomId,
|
107 |
| - |
108 |
| - /// The event ID of the last known event in the predecesssor room. |
109 |
| - pub last_event_id: OwnedEventId, |
110 | 104 | }
|
111 | 105 |
|
112 | 106 | #[cfg(test)]
|
@@ -252,7 +246,6 @@ mod tests {
|
252 | 246 | assert!(room.create_content().is_some());
|
253 | 247 | assert_matches!(room.predecessor_room(), Some(predecessor_room) => {
|
254 | 248 | assert_eq!(predecessor_room.room_id, predecessor_room_id);
|
255 |
| - assert_eq!(predecessor_room.last_event_id, predecessor_last_event_id); |
256 | 249 | });
|
257 | 250 | }
|
258 | 251 | }
|
0 commit comments