summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-07-20 09:46:33 +0100
committerErik Johnston <erik@matrix.org>2017-07-20 09:46:33 +0100
commit6f443a74cf6ab0bfe452289f9888580725987765 (patch)
treec993649ca55493d35e9be821b2768dbee30531df /synapse/rest
parentComments (diff)
downloadsynapse-6f443a74cf6ab0bfe452289f9888580725987765.tar.xz
Add update group profile API
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/v2_alpha/groups.py12
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..64d803d489 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, content):
+        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