diff options
author | Luke Barnard <lukeb@openmarket.com> | 2017-10-31 17:04:28 +0000 |
---|---|---|
committer | Luke Barnard <lukeb@openmarket.com> | 2017-10-31 17:04:28 +0000 |
commit | 20fe347906355e6eec2b890f5d9dc8e2c4534ce3 (patch) | |
tree | 628df3eb06d9fa513d0a6c3ce1ccdecb4115b9c9 /synapse/groups | |
parent | Merge pull request #2609 from matrix-org/rav/refactor_login (diff) | |
download | synapse-20fe347906355e6eec2b890f5d9dc8e2c4534ce3.tar.xz |
Modify group room association API to allow modification of is_public
also includes renamings to make things more consistent.
Diffstat (limited to 'synapse/groups')
-rw-r--r-- | synapse/groups/groups_server.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/groups/groups_server.py b/synapse/groups/groups_server.py index dedc9cc7fd..c91d8e624f 100644 --- a/synapse/groups/groups_server.py +++ b/synapse/groups/groups_server.py @@ -531,7 +531,7 @@ class GroupsServerHandler(object): }) @defer.inlineCallbacks - def add_room_to_group(self, group_id, requester_user_id, room_id, content): + def update_room_group_association(self, group_id, requester_user_id, room_id, content): """Add room to group """ RoomID.from_string(room_id) # Ensure valid room id @@ -542,19 +542,19 @@ class GroupsServerHandler(object): is_public = _parse_visibility_from_contents(content) - yield self.store.add_room_to_group(group_id, room_id, is_public=is_public) + yield self.store.update_room_group_association(group_id, room_id, is_public=is_public) defer.returnValue({}) @defer.inlineCallbacks - def remove_room_from_group(self, group_id, requester_user_id, room_id): + def delete_room_group_association(self, group_id, requester_user_id, room_id): """Remove room from group """ yield self.check_group_is_ours( group_id, requester_user_id, and_exists=True, and_is_admin=requester_user_id ) - yield self.store.remove_room_from_group(group_id, room_id) + yield self.store.delete_room_group_association(group_id, room_id) defer.returnValue({}) |