diff options
author | Erik Johnston <erik@matrix.org> | 2018-02-14 12:23:16 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-02-15 09:51:09 +0000 |
commit | 2c72d66cda2bdfe0825a42bcef224d10bc070b44 (patch) | |
tree | e99c8e35523366c4c01e627ca0fd1254f3acd327 /synapse | |
parent | Add dummy presence REST handler to frontend proxy (diff) | |
download | synapse-2c72d66cda2bdfe0825a42bcef224d10bc070b44.tar.xz |
Move event sending to end in shutdown room admin api
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/rest/client/v1/admin.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/synapse/rest/client/v1/admin.py b/synapse/rest/client/v1/admin.py index 6073cc6fa2..b34f4e0cac 100644 --- a/synapse/rest/client/v1/admin.py +++ b/synapse/rest/client/v1/admin.py @@ -212,17 +212,6 @@ class ShutdownRoomRestServlet(ClientV1RestServlet): ) new_room_id = info["room_id"] - yield self.event_creation_handler.create_and_send_nonmember_event( - room_creator_requester, - { - "type": "m.room.message", - "content": {"body": message, "msgtype": "m.text"}, - "room_id": new_room_id, - "sender": new_room_user_id, - }, - ratelimit=False, - ) - requester_user_id = requester.user.to_string() logger.info("Shutting down room %r", room_id) @@ -260,6 +249,17 @@ class ShutdownRoomRestServlet(ClientV1RestServlet): kicked_users.append(user_id) + yield self.event_creation_handler.create_and_send_nonmember_event( + room_creator_requester, + { + "type": "m.room.message", + "content": {"body": message, "msgtype": "m.text"}, + "room_id": new_room_id, + "sender": new_room_user_id, + }, + ratelimit=False, + ) + aliases_for_room = yield self.store.get_aliases_for_room(room_id) yield self.store.update_aliases_for_room( |