Skip to content

Commit

Permalink
feat(ui): Add m.room.tombstone to the room list required_state.
Browse files Browse the repository at this point in the history
This patch adds the `m.room.tombstone` state event to the list of
events in `required_state` used by the `RoomListService`. The goal is to
offer the possibility for the consumers to know whether a room has been
tombstoned or not.
  • Loading branch information
Hywan committed Nov 4, 2024
1 parent 71abbeb commit aad7af3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/matrix-sdk-ui/src/room_list_service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const DEFAULT_REQUIRED_STATE: &[(StateEventType, &str)] = &[
(StateEventType::RoomCanonicalAlias, ""),
(StateEventType::RoomPowerLevels, ""),
(StateEventType::CallMember, "*"),
(StateEventType::RoomTombstone, ""),
];

/// The default `required_state` constant value for sliding sync room
Expand Down
3 changes: 3 additions & 0 deletions crates/matrix-sdk-ui/tests/integration/room_list_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ async fn test_sync_all_states() -> Result<(), Error> {
["m.room.canonical_alias", ""],
["m.room.power_levels", ""],
["org.matrix.msc3401.call.member", "*"],
["m.room.tombstone", ""],
],
"include_heroes": true,
"filters": {
Expand Down Expand Up @@ -2100,6 +2101,7 @@ async fn test_room_subscription() -> Result<(), Error> {
["m.room.canonical_alias", ""],
["m.room.power_levels", ""],
["org.matrix.msc3401.call.member", "*"],
["m.room.tombstone", ""],
["m.room.create", ""],
["m.room.pinned_events", ""],
],
Expand Down Expand Up @@ -2138,6 +2140,7 @@ async fn test_room_subscription() -> Result<(), Error> {
["m.room.canonical_alias", ""],
["m.room.power_levels", ""],
["org.matrix.msc3401.call.member", "*"],
["m.room.tombstone", ""],
["m.room.create", ""],
["m.room.pinned_events", ""],
],
Expand Down

0 comments on commit aad7af3

Please sign in to comment.