summary refs log tree commit diff
path: root/synapse/groups/groups_server.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-11-08 15:43:34 +0000
committerGitHub <noreply@github.com>2017-11-08 15:43:34 +0000
commit94ff2cda73cbd1aa14b2dd07f9598733229abc00 (patch)
tree533a5d827bd693e5f56d9fe3e146ef0887db4275 /synapse/groups/groups_server.py
parentMerge pull request #2631 from xyzz/fix_appservice_event_backlog (diff)
downloadsynapse-94ff2cda73cbd1aa14b2dd07f9598733229abc00.tar.xz
Revert "Modify group room association API to allow modification of is_public"
Diffstat (limited to 'synapse/groups/groups_server.py')
-rw-r--r--synapse/groups/groups_server.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/synapse/groups/groups_server.py b/synapse/groups/groups_server.py
index 11199dd215..81f21a36f5 100644
--- a/synapse/groups/groups_server.py
+++ b/synapse/groups/groups_server.py
@@ -530,9 +530,8 @@ class GroupsServerHandler(object):
         })
 
     @defer.inlineCallbacks
-    def update_room_group_association(self, group_id, requester_user_id, room_id,
-                                      content):
-        """Add or update an association between room and group
+    def add_room_to_group(self, group_id, requester_user_id, room_id, content):
+        """Add room to group
         """
         RoomID.from_string(room_id)  # Ensure valid room id
 
@@ -542,21 +541,19 @@ class GroupsServerHandler(object):
 
         is_public = _parse_visibility_from_contents(content)
 
-        yield self.store.update_room_group_association(
-            group_id, room_id, is_public=is_public
-        )
+        yield self.store.add_room_to_group(group_id, room_id, is_public=is_public)
 
         defer.returnValue({})
 
     @defer.inlineCallbacks
-    def delete_room_group_association(self, group_id, requester_user_id, room_id):
+    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, requester_user_id, and_exists=True, and_is_admin=requester_user_id
         )
 
-        yield self.store.delete_room_group_association(group_id, room_id)
+        yield self.store.remove_room_from_group(group_id, room_id)
 
         defer.returnValue({})