|
18 | 18 | use matrix_sdk_common::store_locks::LockStoreError; |
19 | 19 | #[cfg(feature = "e2e-encryption")] |
20 | 20 | use matrix_sdk_crypto::{CryptoStoreError, MegolmError, OlmError}; |
21 | | -use ruma::OwnedRoomId; |
22 | 21 | use thiserror::Error; |
23 | 22 |
|
24 | 23 | use crate::event_cache::store::EventCacheStoreError; |
@@ -81,59 +80,4 @@ pub enum Error { |
81 | 80 | /// There was a [`serde_json`] deserialization error. |
82 | 81 | #[error(transparent)] |
83 | 82 | 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 | | - }, |
139 | 83 | } |
0 commit comments