summary refs log tree commit diff
path: root/synapse/rest/admin
diff options
context:
space:
mode:
authorJason Robinson <jasonr@matrix.org>2021-01-08 00:12:23 +0200
committerJason Robinson <jasonr@matrix.org>2021-01-08 00:12:23 +0200
commit85c0999bfb70f2e8438a9730b8858e7845027190 (patch)
treea968e61583f2a914967ba8687cf0323f224881e1 /synapse/rest/admin
parentMove unknown room ID error into resolve_room_id (diff)
downloadsynapse-85c0999bfb70f2e8438a9730b8858e7845027190.tar.xz
Add Rooms admin forward extremities DELETE endpoint
Signed-off-by: Jason Robinson <jasonr@matrix.org>
Diffstat (limited to 'synapse/rest/admin')
-rw-r--r--synapse/rest/admin/rooms.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/rest/admin/rooms.py b/synapse/rest/admin/rooms.py
index 1f7b7daea9..76f8603821 100644
--- a/synapse/rest/admin/rooms.py
+++ b/synapse/rest/admin/rooms.py
@@ -543,6 +543,11 @@ class ForwardExtremitiesRestServlet(RestServlet):
 
         room_id = await self.resolve_room_id(room_identifier)
 
+        deleted_count = await self.store.delete_forward_extremities_for_room(room_id)
+        return 200, {
+            "deleted": deleted_count,
+        }
+
     async def on_GET(self, request, room_identifier):
         requester = await self.auth.get_user_by_req(request)
         await assert_user_is_admin(self.auth, requester.user)