diff options
author | Erik Johnston <erik@matrix.org> | 2017-09-26 15:52:41 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-09-26 15:52:41 +0100 |
commit | 17b8e2bd02ad0abbd25103b637eb8490f3a53507 (patch) | |
tree | 889b3b1cbfc30181fe7c9e67e122d3c0f1cc5d03 /synapse/groups/groups_server.py | |
parent | Add unique index to group_rooms table (diff) | |
download | synapse-17b8e2bd02ad0abbd25103b637eb8490f3a53507.tar.xz |
Add remove room API
Diffstat (limited to 'synapse/groups/groups_server.py')
-rw-r--r-- | synapse/groups/groups_server.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/groups/groups_server.py b/synapse/groups/groups_server.py index 699d8a5265..10bf61d178 100644 --- a/synapse/groups/groups_server.py +++ b/synapse/groups/groups_server.py @@ -473,6 +473,18 @@ class GroupsServerHandler(object): defer.returnValue({}) @defer.inlineCallbacks + def remove_room_from_group(self, group_id, requester_user_id, room_id): + """Remove room from group + """ + yield self.check_group_is_ours( + group_id, and_exists=True, and_is_admin=requester_user_id + ) + + yield self.store.remove_room_from_group(group_id, room_id) + + defer.returnValue({}) + + @defer.inlineCallbacks def invite_to_group(self, group_id, user_id, requester_user_id, content): """Invite user to group """ |