-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
How to delete local media for a specific user ? #9565
Comments
Currently you can only use the admin API to quarantine media by uploader user ID: https://github.com/matrix-org/synapse/blob/develop/docs/admin_api/media_admin_api.md#quarantining-all-media-of-a-user. This prevents your server from serving the media to anyone anymore, and is typically used to combat abusive material (while allowing you to inspect it before blasting it away). There isn't currently an equivalent endpoint for deleting media by user ID, however you can get all IDs of media uploaded by a given user with the following database query: SELECT * FROM local_media_repository WHERE user_id = '@alice:example.com'; And then use the Delete Local Media Admin API to remove each one. |
There's an admin API for this: https://github.com/matrix-org/synapse/blob/develop/docs/admin_api/user_admin_api.rst#list-media-of-a-user |
) Earlier [I was convinced](#9565) that we didn't have an Admin API for listing media uploaded by a user. Foolishly I was looking under the Media Admin API documentation, instead of the User Admin API documentation. I thought it'd be helpful to link to the latter so others don't hit the same dead end :)
How to delete local media for a specific user ?
The text was updated successfully, but these errors were encountered: