summary refs log tree commit diff
path: root/synapse/storage/group_server.py
diff options
context:
space:
mode:
authorLuke Barnard <luke@matrix.org>2018-04-03 15:40:43 +0100
committerLuke Barnard <luke@matrix.org>2018-04-03 16:16:40 +0100
commiteb8d8d6f57c7f6017548aa95409bb8cc346a5ae0 (patch)
treeaa99b62a30badf0669b8e0ccae3960a9bdfd490e /synapse/storage/group_server.py
parentThis should probably be a PUT (diff)
downloadsynapse-eb8d8d6f57c7f6017548aa95409bb8cc346a5ae0.tar.xz
Use join_policy API instead of joinable
The API is now under
 /groups/$group_id/setting/m.join_policy

and expects a JSON blob of the shape

```json
{
  "m.join_policy": {
    "type": "invite"
  }
}
```

where "invite" could alternatively be "open".
Diffstat (limited to 'synapse/storage/group_server.py')
-rw-r--r--synapse/storage/group_server.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/group_server.py b/synapse/storage/group_server.py
index 96553d4fb1..db66ea1eb0 100644
--- a/synapse/storage/group_server.py
+++ b/synapse/storage/group_server.py
@@ -30,16 +30,16 @@ _DEFAULT_ROLE_ID = ""
 
 
 class GroupServerStore(SQLBaseStore):
-    def set_group_joinable(self, group_id, is_joinable):
+    def set_group_join_policy(self, group_id, join_policy):
         return self._simple_update_one(
             table="groups",
             keyvalues={
                 "group_id": group_id,
             },
             updatevalues={
-                "is_joinable": is_joinable,
+                "join_policy": join_policy,
             },
-            desc="set_group_joinable",
+            desc="set_group_join_policy",
         )
 
     def get_group(self, group_id):