Skip to content

Commit

Permalink
feat(ui): Add m.room.topic and m.room.pinned_events in all_rooms.
Browse files Browse the repository at this point in the history
This patch adds the `m.room.topic` and `m.room.pinned_events` state
events in the `required_state` of the `all_rooms` sliding sync list of
`RoomListService`.
  • Loading branch information
Hywan committed Oct 22, 2024
1 parent 684889c commit 2779bed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion crates/matrix-sdk-ui/src/room_list_service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,14 @@ impl RoomListService {
)
.timeline_limit(1)
.required_state(vec![
(StateEventType::RoomName, "".to_owned()),
(StateEventType::RoomEncryption, "".to_owned()),
(StateEventType::RoomMember, "$LAZY".to_owned()),
(StateEventType::RoomMember, "$ME".to_owned()),
(StateEventType::RoomName, "".to_owned()),
(StateEventType::RoomTopic, "".to_owned()),
(StateEventType::RoomCanonicalAlias, "".to_owned()),
(StateEventType::RoomPowerLevels, "".to_owned()),
(StateEventType::RoomPinnedEvents, "".to_owned()),
(StateEventType::CallMember, "".to_owned()),
])
.include_heroes(Some(true))
Expand Down
7 changes: 4 additions & 3 deletions crates/matrix-sdk-ui/tests/integration/room_list_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,14 +327,15 @@ async fn test_sync_all_states() -> Result<(), Error> {
ALL_ROOMS: {
"ranges": [[0, 19]],
"required_state": [
["m.room.name", ""],
["m.room.encryption", ""],
["m.room.member", "$LAZY"],
["m.room.member", "$ME"],
["m.room.name", ""],
["m.room.topic", ""],
["m.room.canonical_alias", ""],
["m.room.avatar", ""],
["m.room.power_levels", ""],
["m.call.member", ""],
["m.room.pinned_events", ""],
["org.matrix.msc3401.call.member", ""],
],
"include_heroes": true,
"filters": {
Expand Down

0 comments on commit 2779bed

Please sign in to comment.