diff options
author | Erik Johnston <erikj@jki.re> | 2018-02-06 17:01:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-06 17:01:17 +0000 |
commit | 617199d73df9fb06f8ade6989b2ef477336f7530 (patch) | |
tree | dee7ee2966595657c2013490e23053a8c3a2850e /synapse/rest/client/v1/admin.py | |
parent | Store state groups separately from events (#2784) (diff) | |
parent | Update copyright (diff) | |
download | synapse-617199d73df9fb06f8ade6989b2ef477336f7530.tar.xz |
Merge pull request #2847 from matrix-org/erikj/separate_event_creation
Split event creation into a separate handler
Diffstat (limited to 'synapse/rest/client/v1/admin.py')
-rw-r--r-- | synapse/rest/client/v1/admin.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/rest/client/v1/admin.py b/synapse/rest/client/v1/admin.py index 0615e5d807..20c5c66632 100644 --- a/synapse/rest/client/v1/admin.py +++ b/synapse/rest/client/v1/admin.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd +# Copyright 2018 New Vector Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -171,6 +172,7 @@ class ShutdownRoomRestServlet(ClientV1RestServlet): self.store = hs.get_datastore() self.handlers = hs.get_handlers() self.state = hs.get_state_handler() + self.event_creation_handler = hs.get_event_creation_handler() @defer.inlineCallbacks def on_POST(self, request, room_id): @@ -203,8 +205,7 @@ class ShutdownRoomRestServlet(ClientV1RestServlet): ) new_room_id = info["room_id"] - msg_handler = self.handlers.message_handler - yield msg_handler.create_and_send_nonmember_event( + yield self.event_creation_handler.create_and_send_nonmember_event( room_creator_requester, { "type": "m.room.message", |