diff options
author | Erik Johnston <erik@matrix.org> | 2017-11-08 16:13:27 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-11-08 16:13:27 +0000 |
commit | e8814410ef682a1e277a1cfe6fda7268fd7a33d6 (patch) | |
tree | 56020619a56a2483ff69427aff5e4f223c8d7ade /synapse/storage/group_server.py | |
parent | Revert "Modify group room association API to allow modification of is_public" (diff) | |
download | synapse-e8814410ef682a1e277a1cfe6fda7268fd7a33d6.tar.xz |
Have an explicit API to update room config
Diffstat (limited to 'synapse/storage/group_server.py')
-rw-r--r-- | synapse/storage/group_server.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/storage/group_server.py b/synapse/storage/group_server.py index ede6bdfaee..6cb4ac28be 100644 --- a/synapse/storage/group_server.py +++ b/synapse/storage/group_server.py @@ -857,6 +857,19 @@ class GroupServerStore(SQLBaseStore): desc="add_room_to_group", ) + def update_room_in_group_visibility(self, group_id, room_id, is_public): + return self._simple_update( + table="group_rooms", + keyvalues={ + "group_id": group_id, + "room_id": room_id, + }, + values={ + "is_public": is_public, + }, + desc="update_room_in_group_visibility", + ) + def remove_room_from_group(self, group_id, room_id): def _remove_room_from_group_txn(txn): self._simple_delete_txn( |