Send message after room has been shutdown
Currently the explanation message is sent to the abuse room before any users are forced joined, which means it tends to get lost in the backlog of joins. So instead we send the message *after* we've forced joined everyone.pull/4817/head
parent
7b8a157b79
commit
b879870b2d
|
@ -488,17 +488,6 @@ class ShutdownRoomRestServlet(ClientV1RestServlet):
|
||||||
)
|
)
|
||||||
new_room_id = info["room_id"]
|
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()
|
requester_user_id = requester.user.to_string()
|
||||||
|
|
||||||
logger.info("Shutting down room %r", room_id)
|
logger.info("Shutting down room %r", room_id)
|
||||||
|
@ -536,6 +525,17 @@ class ShutdownRoomRestServlet(ClientV1RestServlet):
|
||||||
|
|
||||||
kicked_users.append(user_id)
|
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)
|
aliases_for_room = yield self.store.get_aliases_for_room(room_id)
|
||||||
|
|
||||||
yield self.store.update_aliases_for_room(
|
yield self.store.update_aliases_for_room(
|
||||||
|
|
Loading…
Reference in New Issue