Remove unspecced DELETE endpoint that modifies room visibility (#13123)

This commit is contained in:
santhoshivan23 2022-06-28 16:52:59 +05:30 committed by GitHub
parent 1017f09c18
commit 6b99a66fe0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 11 deletions

View file

@ -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"`.

View file

@ -151,17 +151,6 @@ class ClientDirectoryListServer(RestServlet):
return 200, {} 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): class ClientAppserviceDirectoryListServer(RestServlet):
PATTERNS = client_patterns( PATTERNS = client_patterns(