Skip to content

Commit d482f7b

Browse files
committed
Request both m.space.parent and m.space.child state events in the sliding sync required state as they're both required to build a full view of the room hierarchy.
1 parent eeddf05 commit d482f7b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

crates/matrix-sdk-ui/src/room_list_service/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ const DEFAULT_REQUIRED_STATE: &[(StateEventType, &str)] = &[
9696
(StateEventType::RoomHistoryVisibility, ""),
9797
// Required to correctly calculate the room display name.
9898
(StateEventType::MemberHints, ""),
99+
(StateEventType::SpaceParent, "*"),
100+
(StateEventType::SpaceChild, "*"),
99101
];
100102

101103
/// The default `required_state` constant value for sliding sync room

crates/matrix-sdk-ui/tests/integration/room_list_service.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,8 @@ async fn test_sync_all_states() -> Result<(), Error> {
369369
["m.room.create", ""],
370370
["m.room.history_visibility", ""],
371371
["io.element.functional_members", ""],
372+
["m.space.parent", "*"],
373+
["m.space.child", "*"],
372374
],
373375
"filters": {},
374376
"timeline_limit": 1,
@@ -2273,6 +2275,8 @@ async fn test_room_subscription() -> Result<(), Error> {
22732275
["m.room.create", ""],
22742276
["m.room.history_visibility", ""],
22752277
["io.element.functional_members", ""],
2278+
["m.space.parent", "*"],
2279+
["m.space.child", "*"],
22762280
["m.room.pinned_events", ""],
22772281
],
22782282
"timeline_limit": 20,
@@ -2316,6 +2320,8 @@ async fn test_room_subscription() -> Result<(), Error> {
23162320
["m.room.create", ""],
23172321
["m.room.history_visibility", ""],
23182322
["io.element.functional_members", ""],
2323+
["m.space.parent", "*"],
2324+
["m.space.child", "*"],
23192325
["m.room.pinned_events", ""],
23202326
],
23212327
"timeline_limit": 20,

0 commit comments

Comments
 (0)