From bad82ccd42b96deb794ca5a6d34d35ba36b5e7ea Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Mon, 19 May 2025 17:27:14 +0200 Subject: [PATCH] doc(ui): Explain why `m.room.create` is necessary. This patch explains why having `m.room.create` is necessary. It's not only about the room previews, but also about the room versions, and thus the tombstoned rooms. --- crates/matrix-sdk-ui/src/room_list_service/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/matrix-sdk-ui/src/room_list_service/mod.rs b/crates/matrix-sdk-ui/src/room_list_service/mod.rs index ebfd3726f..41b9ed0f6 100644 --- a/crates/matrix-sdk-ui/src/room_list_service/mod.rs +++ b/crates/matrix-sdk-ui/src/room_list_service/mod.rs @@ -90,6 +90,8 @@ const DEFAULT_REQUIRED_STATE: &[(StateEventType, &str)] = &[ (StateEventType::RoomJoinRules, ""), (StateEventType::RoomTombstone, ""), // Those two events are required to properly compute room previews. + // `StateEventType::RoomCreate` is also necessary to compute the room + // version, and thus handling the tombstoned room correctly. (StateEventType::RoomCreate, ""), (StateEventType::RoomHistoryVisibility, ""), // Required to correctly calculate the room display name.