diff options
author | Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> | 2021-08-11 21:29:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-11 19:29:59 +0000 |
commit | 915b37e5efd4e0fb9e57ce9895300017b4b3dd43 (patch) | |
tree | 875767cf231fbb8003ac1e61e9780393c272125e /synapse/rest/media | |
parent | Allow requesting the summary of a space which is joinable. (#10580) (diff) | |
download | synapse-915b37e5efd4e0fb9e57ce9895300017b4b3dd43.tar.xz |
Admin API to delete media for a specific user (#10558)
Diffstat (limited to 'synapse/rest/media')
-rw-r--r-- | synapse/rest/media/v1/media_repository.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/rest/media/v1/media_repository.py b/synapse/rest/media/v1/media_repository.py index 4f702f890c..0f5ce41ff8 100644 --- a/synapse/rest/media/v1/media_repository.py +++ b/synapse/rest/media/v1/media_repository.py @@ -836,7 +836,9 @@ class MediaRepository: return {"deleted": deleted} - async def delete_local_media(self, media_id: str) -> Tuple[List[str], int]: + async def delete_local_media_ids( + self, media_ids: List[str] + ) -> Tuple[List[str], int]: """ Delete the given local or remote media ID from this server @@ -845,7 +847,7 @@ class MediaRepository: Returns: A tuple of (list of deleted media IDs, total deleted media IDs). """ - return await self._remove_local_media_from_disk([media_id]) + return await self._remove_local_media_from_disk(media_ids) async def delete_old_local_media( self, |