Skip to content

Commit 216e878

Browse files
committed
Revert "feat(base): Detecting invalid states in room upgrades."
This reverts commit c7f6190.
1 parent e54b20f commit 216e878

4 files changed

Lines changed: 2 additions & 544 deletions

File tree

crates/matrix-sdk-base/src/client.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,9 +623,6 @@ impl BaseClient {
623623
room_updates.knocked.insert(room_id, knocked_room_update);
624624
}
625625

626-
// Check if tombstoned rooms are not creating an invalid state, like a loop.
627-
processors::state_events::check_tombstone(&mut context, &room_updates, &self.state_store)?;
628-
629626
global_account_data_processor.apply(&mut context, &self.state_store).await;
630627

631628
context.state_changes.presence = response

crates/matrix-sdk-base/src/error.rs

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use matrix_sdk_common::store_locks::LockStoreError;
1919
#[cfg(feature = "e2e-encryption")]
2020
use matrix_sdk_crypto::{CryptoStoreError, MegolmError, OlmError};
21-
use ruma::OwnedRoomId;
2221
use thiserror::Error;
2322

2423
use crate::event_cache::store::EventCacheStoreError;
@@ -81,59 +80,4 @@ pub enum Error {
8180
/// There was a [`serde_json`] deserialization error.
8281
#[error(transparent)]
8382
DeserializationError(#[from] serde_json::error::Error),
84-
85-
/// Tombstoned rooms are creating a loop, or a merger.
86-
///
87-
/// The shortest loop is a room upgrading/replacing itself:
88-
///
89-
/// ```text
90-
/// m.room.tombstone
91-
/// replaced by room A
92-
/// ┌──────────────┐
93-
/// │ │
94-
/// │ ┌────────┐ │
95-
/// └──┤ room A ◄──┘
96-
/// └────────┘
97-
/// ```
98-
///
99-
/// But a more common case can involve more rooms:
100-
///
101-
/// ```text
102-
/// m.room.tombstone
103-
/// replaced by room B
104-
/// ┌───────────────────┐
105-
/// │ │
106-
/// ┌───┴────┐ ┌────▼───┐
107-
/// │ room A │ │ room B │
108-
/// └───▲────┘ └────┬───┘
109-
/// │ │
110-
/// └───────────────────┘
111-
/// m.room.tombstone
112-
/// replaced by room A
113-
/// ```
114-
///
115-
/// A merger is when two rooms are upgrading to the same room:
116-
///
117-
/// ```text
118-
/// m.room.tombstone
119-
/// replaced by room C
120-
/// ┌──────────────┐
121-
/// │ │
122-
/// ┌────┴───┐ │
123-
/// │ room A │ │
124-
/// └────────┘ ┌────▼───┐
125-
/// │ room C │
126-
/// ┌────────┐ └────▲───┘
127-
/// │ room B │ │
128-
/// └────┬───┘ │
129-
/// │ │
130-
/// └──────────────┘
131-
/// m.room.tombstone
132-
/// replaced by room C
133-
/// ```
134-
#[error("inconsistent tombstone room state: a loop or a merger is detected, it includes `{room_in_path:?}`")]
135-
InconsistentTombstonedRooms {
136-
/// One of the room that is part of the loop, or a merger.
137-
room_in_path: OwnedRoomId,
138-
},
13983
}

0 commit comments

Comments
 (0)