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/federation | |
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/federation')
-rw-r--r-- | synapse/federation/transport/server.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/federation/transport/server.py b/synapse/federation/transport/server.py index 1332b49f35..e04750fd2a 100644 --- a/synapse/federation/transport/server.py +++ b/synapse/federation/transport/server.py @@ -642,6 +642,18 @@ class FederationGroupsSummaryServlet(BaseFederationServlet): defer.returnValue((200, new_content)) + @defer.inlineCallbacks + def on_POST(self, origin, content, query, group_id): + requester_user_id = parse_string_from_args(query, "requester_user_id") + if get_domain_from_id(requester_user_id) != origin: + raise SynapseError(403, "requester_user_id doesn't match origin") + + new_content = yield self.handler.update_group_profile( + group_id, requester_user_id, content + ) + + defer.returnValue((200, new_content)) + class FederationGroupsRoomsServlet(BaseFederationServlet): """Get the rooms in a group on behalf of a user |