From 78f2312847078b7c5823dcc8fc36104456172de5 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 5 Jan 2022 12:41:55 -0700 Subject: [PATCH] Remove `aliases` from `/publicRooms` response Through attempting to land [Synapse#11667](https://github.com/matrix-org/synapse/pull/11667) it was found that Synapse doesn't return the `aliases` property on `/publicRooms` as it was [removed](https://github.com/matrix-org/synapse/pull/6970) by a [tracking issue](https://github.com/matrix-org/synapse/issues/6898) referencing [MSC2432](https://github.com/matrix-org/matrix-doc/pull/2432) as its base. Though MSC2432 does not make mention of this, the [document](https://docs.google.com/document/d/1NNDkobiFLeUkJtyj0H6qvKIedgvIkZnFKo78-03cGEk/edit) the MSC is based upon makes deliberate effort to mention the endpoint and the removal of `aliases`. Thus, it is determined as a likely accidental omission from the formal MSC and therefore the formal spec. This has been corrected here by amending the MSC (per the process) and removing the field, basing itself off of the [spec PR for spaces](https://github.com/matrix-org/matrix-doc/pull/3610) for diff clarity. --- data/api/client-server/definitions/public_rooms_chunk.yaml | 6 ------ .../client-server/definitions/public_rooms_response.yaml | 1 - data/api/client-server/space_hierarchy.yaml | 1 - data/api/server-server/public_rooms.yaml | 1 - data/api/server-server/space_hierarchy.yaml | 2 -- proposals/2432-revised-alias-publishing.md | 5 +++++ 6 files changed, 5 insertions(+), 11 deletions(-) diff --git a/data/api/client-server/definitions/public_rooms_chunk.yaml b/data/api/client-server/definitions/public_rooms_chunk.yaml index a2e78c14599..ff563a3c5ac 100644 --- a/data/api/client-server/definitions/public_rooms_chunk.yaml +++ b/data/api/client-server/definitions/public_rooms_chunk.yaml @@ -15,12 +15,6 @@ type: object title: "PublicRoomsChunk" properties: - aliases: - type: array - description: Aliases of the room. May be empty. - items: - type: string - example: ["#general:example.org"] canonical_alias: type: string description: The canonical alias of the room, if any. diff --git a/data/api/client-server/definitions/public_rooms_response.yaml b/data/api/client-server/definitions/public_rooms_response.yaml index 91281b69c12..eead831e368 100644 --- a/data/api/client-server/definitions/public_rooms_response.yaml +++ b/data/api/client-server/definitions/public_rooms_response.yaml @@ -55,7 +55,6 @@ properties: example: { "chunk": [ { - "aliases": ["#murrays:cheese.bar"], "avatar_url": "mxc://bleecker.street/CHEDDARandBRIE", "guest_can_join": false, "name": "CHEESE", diff --git a/data/api/client-server/space_hierarchy.yaml b/data/api/client-server/space_hierarchy.yaml index 366b4942251..607eb8d18e0 100644 --- a/data/api/client-server/space_hierarchy.yaml +++ b/data/api/client-server/space_hierarchy.yaml @@ -100,7 +100,6 @@ paths: "join_rule": "public", "room_type": "m.space", "num_joined_members": 42, - "aliases": ["#general:example.org"], "canonical_alias": "#general:example.org", "children_state": [ { diff --git a/data/api/server-server/public_rooms.yaml b/data/api/server-server/public_rooms.yaml index 024691fab21..ba949bcc860 100644 --- a/data/api/server-server/public_rooms.yaml +++ b/data/api/server-server/public_rooms.yaml @@ -178,7 +178,6 @@ paths: application/json: { "chunk": [ { - "aliases": ["#murrays:cheese.bar"], "avatar_url": "mxc://bleecker.street/CHEDDARandBRIE", "guest_can_join": false, "name": "CHEESE", diff --git a/data/api/server-server/space_hierarchy.yaml b/data/api/server-server/space_hierarchy.yaml index 99b86577e3a..4edff689b91 100644 --- a/data/api/server-server/space_hierarchy.yaml +++ b/data/api/server-server/space_hierarchy.yaml @@ -74,7 +74,6 @@ paths: "join_rule": "public", "room_type": "m.space", "num_joined_members": 42, - "aliases": ["#general:example.org"], "canonical_alias": "#general:example.org", "allowed_room_ids": [], "children_state": [ @@ -103,7 +102,6 @@ paths: "join_rule": "restricted", "room_type": "m.space", "num_joined_members": 42, - "aliases": ["#general:example.org"], "canonical_alias": "#general:example.org", "allowed_room_ids": [ "!upstream:example.org" diff --git a/proposals/2432-revised-alias-publishing.md b/proposals/2432-revised-alias-publishing.md index 4c2f010f13b..2a872dd623d 100644 --- a/proposals/2432-revised-alias-publishing.md +++ b/proposals/2432-revised-alias-publishing.md @@ -148,6 +148,11 @@ rules](https://matrix.org/docs/spec/rooms/v1#authorization-rules) and Servers might also choose to allow access to other users such as server administrators. + * [`GET /_matrix/client/r0/publicRooms`](https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-publicrooms) (and the `POST` variant) no longer return + `aliases` as part of `PublicRoomsChunk`. Clients do not appear to make use + of this field, and `canonical_alias` is maintained to provide similar + information. + Various APIs are currently subject to implementation-defined access restrictions. No change to the specification is introduced in this regard (implementations will continue to be free to impose their own