diff options
author | Erik Johnston <erik@matrix.org> | 2018-07-18 15:22:02 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-07-18 15:33:03 +0100 |
commit | 8cb8df55e9bb5de27d9e6570441560eb81db36df (patch) | |
tree | 26768e4be0eb266527f6cf72a953c91295e6fbc9 /synapse/rest/client/v1/admin.py | |
parent | Merge pull request #3367 from matrix-org/rav/drop_re_signing_hacks (diff) | |
download | synapse-8cb8df55e9bb5de27d9e6570441560eb81db36df.tar.xz |
Split MessageHandler into read only and writers
This will let us call the read only parts from workers, and so be able to move some APIs off of master, e.g. the `/state` API.
Diffstat (limited to 'synapse/rest/client/v1/admin.py')
-rw-r--r-- | synapse/rest/client/v1/admin.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/rest/client/v1/admin.py b/synapse/rest/client/v1/admin.py index 2dc50e582b..13fd63a5b2 100644 --- a/synapse/rest/client/v1/admin.py +++ b/synapse/rest/client/v1/admin.py @@ -123,7 +123,7 @@ class PurgeHistoryRestServlet(ClientV1RestServlet): hs (synapse.server.HomeServer) """ super(PurgeHistoryRestServlet, self).__init__(hs) - self.handlers = hs.get_handlers() + self.pagination_handler = hs.get_pagination_handler() self.store = hs.get_datastore() @defer.inlineCallbacks @@ -198,7 +198,7 @@ class PurgeHistoryRestServlet(ClientV1RestServlet): errcode=Codes.BAD_JSON, ) - purge_id = yield self.handlers.message_handler.start_purge_history( + purge_id = yield self.pagination_handler.start_purge_history( room_id, token, delete_local_events=delete_local_events, ) @@ -220,7 +220,7 @@ class PurgeHistoryStatusRestServlet(ClientV1RestServlet): hs (synapse.server.HomeServer) """ super(PurgeHistoryStatusRestServlet, self).__init__(hs) - self.handlers = hs.get_handlers() + self.pagination_handler = hs.get_pagination_handler() @defer.inlineCallbacks def on_GET(self, request, purge_id): @@ -230,7 +230,7 @@ class PurgeHistoryStatusRestServlet(ClientV1RestServlet): if not is_admin: raise AuthError(403, "You are not a server admin") - purge_status = self.handlers.message_handler.get_purge_status(purge_id) + purge_status = self.pagination_handler.get_purge_status(purge_id) if purge_status is None: raise NotFoundError("purge id '%s' not found" % purge_id) |