Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rooms deletion not work #17

Closed
panaceya opened this issue Mar 6, 2020 · 5 comments · Fixed by #44
Closed

Rooms deletion not work #17

panaceya opened this issue Mar 6, 2020 · 5 comments · Fixed by #44
Labels
bug Something isn't working

Comments

@panaceya
Copy link

panaceya commented Mar 6, 2020

As i see application send DELETE request to URI, curl example:

$ curl -X DELETE -H 'Authorization: Bearer <hidden>' 'https://<domain>/_synapse/admin/v1/rooms/!<room_id>:<domain>'

But correct is:

$ curl -v -X POST -d '{ "room_id": "!<room_id>:<domain>"}' --header "Authorization: Bearer <hidden>" 'https://<domain>/_synapse/admin/v1/purge_room'

Doc reference: https://github.com/matrix-org/synapse/blob/master/docs/admin_api/purge_room.md

@awesome-manuel
Copy link
Member

Proper CRUD implementation will be added to v2 admin API in synapse.

@n1trux
Copy link

n1trux commented Mar 17, 2020

until then, can we have a "purge room" feature? :)

@awesome-manuel
Copy link
Member

See matrix-org/synapse#6425

richvdh pushed a commit to matrix-org/synapse that referenced this issue Jul 14, 2020
The Delete Room admin API allows server admins to remove rooms from server
and block these rooms.
`DELETE /_synapse/admin/v1/rooms/<room_id>`
It is a combination and improvement of "[Shutdown room](https://github.com/matrix-org/synapse/blob/develop/docs/admin_api/shutdown_room.md)" and "[Purge room](https://github.com/matrix-org/synapse/blob/develop/docs/admin_api/purge_room.md)" API.

Fixes: #6425 

It also fixes a bug in [synapse/storage/data_stores/main/room.py](synapse/storage/data_stores/main/room.py) in ` get_room_with_stats`.
It should return `None` if the room is unknown. But it returns an `IndexError`.
https://github.com/matrix-org/synapse/blob/901b1fa561e3cc661d78aa96d59802cf2078cb0d/synapse/storage/data_stores/main/room.py#L99-L105

Related to:
- #5575
- Awesome-Technologies/synapse-admin#17

Signed-off-by: Dirk Klimpel [email protected]
@ktpx
Copy link

ktpx commented Aug 25, 2023

This does not work.

@ktpx
Copy link

ktpx commented Aug 25, 2023

{"errcode":"M_UNRECOGNIZED","error":"Unrecognized request"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants