This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Test util create_room_as
is_public
option is misleading #10951
Copy link
Copy link
Closed
Labels
P4(OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patches(OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patchesS-TolerableMinor significance, cosmetic issues, low or no impact to users.Minor significance, cosmetic issues, low or no impact to users.T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.good first issueGood for newcomersGood for newcomers
Description
Defaults to True
.
synapse/tests/rest/client/utils.py
Line 51 in 50022cf
is_public: bool = True, |
Docstring says:
synapse/tests/rest/client/utils.py
Lines 65 to 67 in 50022cf
is_public: If True, the `visibility` parameter will be set to the | |
default (public). Otherwise, the `visibility` parameter will be set | |
to "private". |
But the only use is:
synapse/tests/rest/client/utils.py
Lines 80 to 81 in 50022cf
if not is_public: | |
content["visibility"] = "private" |
Moreover, the CS spec says of visibility
that
Rooms default to private visibility if this key is not included.
Suggest:
- Change is_public to
Optional[bool]
, defaultNone
if is_public is False
, set visibility to privateelif is_public is True
, set visibility to public- else do nothing.
Could alternatively leave it as a bool and fix it to actually set visibility to public when True. That would probably require fixing a bunch of tests to explicitly set is_public
: False.
Spotted by @AndrewFerr in #10930.
Metadata
Metadata
Assignees
Labels
P4(OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patches(OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patchesS-TolerableMinor significance, cosmetic issues, low or no impact to users.Minor significance, cosmetic issues, low or no impact to users.T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.good first issueGood for newcomersGood for newcomers