From 6b99a66fe0260682fa95a0b19d3bee19c1e48876 Mon Sep 17 00:00:00 2001 From: santhoshivan23 <47689668+santhoshivan23@users.noreply.github.com> Date: Tue, 28 Jun 2022 16:52:59 +0530 Subject: [PATCH] Remove unspecced DELETE endpoint that modifies room visibility (#13123) --- changelog.d/13123.removal | 1 + synapse/rest/client/directory.py | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) create mode 100644 changelog.d/13123.removal diff --git a/changelog.d/13123.removal b/changelog.d/13123.removal new file mode 100644 index 000000000..f013f1616 --- /dev/null +++ b/changelog.d/13123.removal @@ -0,0 +1 @@ +Remove the unspecced `DELETE /directory/list/room/{roomId}` endpoint, which hid rooms from the [public room directory](https://spec.matrix.org/v1.3/client-server-api/#listing-rooms). Instead, `PUT` to the same URL with a visibility of `"private"`. \ No newline at end of file diff --git a/synapse/rest/client/directory.py b/synapse/rest/client/directory.py index d6c89cb16..bc1b18c92 100644 --- a/synapse/rest/client/directory.py +++ b/synapse/rest/client/directory.py @@ -151,17 +151,6 @@ class ClientDirectoryListServer(RestServlet): return 200, {} - async def on_DELETE( - self, request: SynapseRequest, room_id: str - ) -> Tuple[int, JsonDict]: - requester = await self.auth.get_user_by_req(request) - - await self.directory_handler.edit_published_room_list( - requester, room_id, "private" - ) - - return 200, {} - class ClientAppserviceDirectoryListServer(RestServlet): PATTERNS = client_patterns(