Unprefix room_version & encryption from hierarchy API (#19576)

These seem to work properly in the hierarchy API so I figured I'd
unprefix them and remove the flag requirement. This should [better align
with the
spec](https://spec.matrix.org/latest/client-server-api/#get_matrixclientv1roomsroomidhierarchy_response-200_spacehierarchyroomschunk)
and Matrix v1.15 (via
[MSC3266](https://github.com/matrix-org/matrix-spec-proposals/pull/3266)),
which says these properties are available and named like this.

Related to #18731.

This doesn't affect the stability or experimental flags of the room
summary API, just the hierarchy API.
This commit is contained in:
Cadence Ember
2026-03-30 21:36:16 -05:00
committed by GitHub
parent 70c6796b98
commit 582f976d40
2 changed files with 3 additions and 5 deletions
+1
View File
@@ -0,0 +1 @@
Stabilize `room_version` and `encryption` fields in the space/room `/hierarchy` API (part of [MSC3266](https://github.com/matrix-org/matrix-spec-proposals/pull/3266)).
+2 -5
View File
@@ -128,7 +128,6 @@ class RoomSummaryHandler:
name="get_room_hierarchy",
server_name=self.server_name,
)
self._msc3266_enabled = hs.config.experimental.msc3266_enabled
async def get_room_hierarchy(
self,
@@ -791,6 +790,7 @@ class RoomSummaryHandler:
entry: JsonDict = {
"room_id": stats.room_id,
"room_version": stats.version,
"name": stats.name,
"topic": stats.topic,
"canonical_alias": stats.canonical_alias,
@@ -802,12 +802,9 @@ class RoomSummaryHandler:
),
"guest_can_join": stats.guest_access == "can_join",
"room_type": stats.room_type,
"encryption": stats.encryption,
}
if self._msc3266_enabled:
entry["im.nheko.summary.version"] = stats.version
entry["im.nheko.summary.encryption"] = stats.encryption
# Federation requests need to provide additional information so the
# requested server is able to filter the response appropriately.
if for_federation: