diff options
author | Erik Johnston <erikj@jki.re> | 2017-07-20 17:53:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-20 17:53:39 +0100 |
commit | 04016042222c89dc604b8fb1b0e87ad4114a4a12 (patch) | |
tree | 825537967b4fd6f8992d9d79fd0f1dc78cd4a3b0 /synapse/rest | |
parent | Merge pull request #2374 from matrix-org/erikj/group_server_local (diff) | |
parent | Remove spurious content param (diff) | |
download | synapse-04016042222c89dc604b8fb1b0e87ad4114a4a12.tar.xz |
Merge pull request #2377 from matrix-org/erikj/group_profile_update
Add update group profile API
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/client/v2_alpha/groups.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/rest/client/v2_alpha/groups.py b/synapse/rest/client/v2_alpha/groups.py index f937d856fd..009cd70737 100644 --- a/synapse/rest/client/v2_alpha/groups.py +++ b/synapse/rest/client/v2_alpha/groups.py @@ -45,6 +45,18 @@ class GroupServlet(RestServlet): defer.returnValue((200, group_description)) + @defer.inlineCallbacks + def on_POST(self, request, group_id): + requester = yield self.auth.get_user_by_req(request) + user_id = requester.user.to_string() + + content = parse_json_object_from_request(request) + yield self.groups_handler.update_group_profile( + group_id, user_id, content, + ) + + defer.returnValue((200, {})) + class GroupSummaryServlet(RestServlet): """Get the full group summary |