feat(ui): Add the MemberHints state event type to the required state

This state event allows us to correctly calculate the room display name
according to MSC4171.

MSC: https://github.com/matrix-org/matrix-spec-proposals/pull/4171
This commit is contained in:
Damir Jelić
2024-12-12 10:31:53 +01:00
parent 780a4630e4
commit f7f58dfd71
2 changed files with 5 additions and 0 deletions

View File

@@ -92,6 +92,8 @@ const DEFAULT_REQUIRED_STATE: &[(StateEventType, &str)] = &[
// Those two events are required to properly compute room previews.
(StateEventType::RoomCreate, ""),
(StateEventType::RoomHistoryVisibility, ""),
// Required to correctly calculate the room display name.
(StateEventType::MemberHints, ""),
];
/// The default `required_state` constant value for sliding sync room

View File

@@ -365,6 +365,7 @@ async fn test_sync_all_states() -> Result<(), Error> {
["m.room.join_rules", ""],
["m.room.create", ""],
["m.room.history_visibility", ""],
["io.element.functional_members", ""],
],
"include_heroes": true,
"filters": {
@@ -2232,6 +2233,7 @@ async fn test_room_subscription() -> Result<(), Error> {
["m.room.join_rules", ""],
["m.room.create", ""],
["m.room.history_visibility", ""],
["io.element.functional_members", ""],
["m.room.pinned_events", ""],
],
"timeline_limit": 20,
@@ -2272,6 +2274,7 @@ async fn test_room_subscription() -> Result<(), Error> {
["m.room.join_rules", ""],
["m.room.create", ""],
["m.room.history_visibility", ""],
["io.element.functional_members", ""],
["m.room.pinned_events", ""],
],
"timeline_limit": 20,