diff options
author | Erik Johnston <erik@matrix.org> | 2017-03-13 09:59:54 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-03-13 09:59:54 +0000 |
commit | 672dcf59d3f9da12da43a77e316e2eec76d3ee4c (patch) | |
tree | 9186644b06ef01e609ca018e02100ceecf0f3ea4 /synapse/rest/client/v1/room.py | |
parent | Merge tag 'v0.19.3-rc1' into release-v0.19.3 (diff) | |
parent | Revert "Support registration & login with phone number" (diff) | |
download | synapse-672dcf59d3f9da12da43a77e316e2eec76d3ee4c.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.19.3
Diffstat (limited to 'synapse/rest/client/v1/room.py')
-rw-r--r-- | synapse/rest/client/v1/room.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/rest/client/v1/room.py b/synapse/rest/client/v1/room.py index 6554f57df1..90242a6bac 100644 --- a/synapse/rest/client/v1/room.py +++ b/synapse/rest/client/v1/room.py @@ -608,6 +608,10 @@ class RoomMembershipRestServlet(ClientV1RestServlet): raise SynapseError(400, "Missing user_id key.") target = UserID.from_string(content["user_id"]) + event_content = None + if 'reason' in content and membership_action in ['kick', 'ban']: + event_content = {'reason': content['reason']} + yield self.handlers.room_member_handler.update_membership( requester=requester, target=target, @@ -615,6 +619,7 @@ class RoomMembershipRestServlet(ClientV1RestServlet): action=membership_action, txn_id=txn_id, third_party_signed=content.get("third_party_signed", None), + content=event_content, ) defer.returnValue((200, {})) |