diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2018-02-09 14:11:00 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-09 14:11:00 +0000 |
commit | 10b34dbb9abcc0800db84dae74a244caaea54e2d (patch) | |
tree | aedd171b7d6973ea2f4c76dfb6e8610737da9e4c /synapse/rest/client/v1/admin.py | |
parent | Merge pull request #2856 from matrix-org/erikj/remove_ratelimit (diff) | |
parent | purge: move room_depth update to end (diff) | |
download | synapse-10b34dbb9abcc0800db84dae74a244caaea54e2d.tar.xz |
Merge pull request #2858 from matrix-org/rav/purge_updates
delete_local_events for purge_room_history
Diffstat (limited to 'synapse/rest/client/v1/admin.py')
-rw-r--r-- | synapse/rest/client/v1/admin.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/synapse/rest/client/v1/admin.py b/synapse/rest/client/v1/admin.py index 20c5c66632..2ad486c67d 100644 --- a/synapse/rest/client/v1/admin.py +++ b/synapse/rest/client/v1/admin.py @@ -129,7 +129,16 @@ class PurgeHistoryRestServlet(ClientV1RestServlet): if not is_admin: raise AuthError(403, "You are not a server admin") - yield self.handlers.message_handler.purge_history(room_id, event_id) + body = parse_json_object_from_request(request, allow_empty_body=True) + + delete_local_events = bool( + body.get("delete_local_history", False) + ) + + yield self.handlers.message_handler.purge_history( + room_id, event_id, + delete_local_events=delete_local_events, + ) defer.returnValue((200, {})) |