From 93fa01f7f51c32f50a01fdbcda8b1d2e31d499e2 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Thu, 23 May 2024 09:14:57 +0200 Subject: [PATCH] feat(ui): Enable `include_heroes` for `all_rooms` and `visible_rooms`. --- crates/matrix-sdk-ui/src/room_list_service/mod.rs | 1 + crates/matrix-sdk-ui/tests/integration/room_list_service.rs | 2 ++ 2 files changed, 3 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 208cd5e1c..7c6a35b15 100644 --- a/crates/matrix-sdk-ui/src/room_list_service/mod.rs +++ b/crates/matrix-sdk-ui/src/room_list_service/mod.rs @@ -459,6 +459,7 @@ fn configure_all_or_visible_rooms_list( ) -> SlidingSyncListBuilder { list_builder .sort(vec!["by_recency".to_owned(), "by_name".to_owned()]) + .include_heroes(Some(true)) .filters(Some(assign!(SyncRequestListFilters::default(), { // As defined in the [SlidingSync MSC](https://github.com/matrix-org/matrix-spec-proposals/blob/9450ced7fb9cf5ea9077d029b3adf36aebfa8709/proposals/3575-sync.md?plain=1#L444) // If unset, both invited and joined rooms are returned. If false, no invited rooms are diff --git a/crates/matrix-sdk-ui/tests/integration/room_list_service.rs b/crates/matrix-sdk-ui/tests/integration/room_list_service.rs index 0b3b91b4f..1d10ddb6c 100644 --- a/crates/matrix-sdk-ui/tests/integration/room_list_service.rs +++ b/crates/matrix-sdk-ui/tests/integration/room_list_service.rs @@ -275,6 +275,7 @@ async fn test_sync_all_states() -> Result<(), Error> { ["m.room.name", ""], ["m.room.power_levels", ""], ], + "include_heroes": true, "filters": { "is_tombstoned": false, "not_room_types": ["m.space"], @@ -333,6 +334,7 @@ async fn test_sync_all_states() -> Result<(), Error> { ["m.room.encryption", ""], ["m.room.member", "$LAZY"], ], + "include_heroes": true, "filters": { "is_tombstoned": false, "not_room_types": ["m.space"],