diff options
author | reivilibre <oliverw@matrix.org> | 2022-04-01 15:55:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 15:55:09 +0100 |
commit | c4cf916ed7d09d13d84f964dd683e1ecfd21815b (patch) | |
tree | 56a9673e2b30190f6f6b1a896bc987949ef1aaa6 /tests/rest | |
parent | Burn `check_signature` dev script. (#12351) (diff) | |
download | synapse-c4cf916ed7d09d13d84f964dd683e1ecfd21815b.tar.xz |
Default to `private` room visibility rather than `public` when a client does not specify one, according to spec. (#12350)
Diffstat (limited to 'tests/rest')
-rw-r--r-- | tests/rest/client/utils.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/rest/client/utils.py b/tests/rest/client/utils.py index 28663826fc..a0788b1bb0 100644 --- a/tests/rest/client/utils.py +++ b/tests/rest/client/utils.py @@ -88,7 +88,7 @@ class RestHelper: def create_room_as( self, room_creator: Optional[str] = None, - is_public: Optional[bool] = None, + is_public: Optional[bool] = True, room_version: Optional[str] = None, tok: Optional[str] = None, expect_code: int = HTTPStatus.OK, @@ -101,9 +101,12 @@ class RestHelper: Args: room_creator: The user ID to create the room with. is_public: If True, the `visibility` parameter will be set to - "public". If False, it will be set to "private". If left - unspecified, the server will set it to an appropriate default - (which should be "private" as per the CS spec). + "public". If False, it will be set to "private". + If None, doesn't specify the `visibility` parameter in which + case the server is supposed to make the room private according to + the CS API. + Defaults to public, since that is commonly needed in tests + for convenience where room privacy is not a problem. room_version: The room version to create the room as. Defaults to Synapse's default room version. tok: The access token to use in the request. |