Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
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

Closed

Description

@DMRobertson

Defaults to True.

is_public: bool = True,

Docstring says:

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:

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], default None
  • if is_public is False, set visibility to private
  • elif 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.

Activity

  1. added
    S-TolerableMinor significance, cosmetic issues, low or no impact to users.
    T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
    P4(OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patches
    on Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4(OBSOLETE: use S- labels.) Okay backlog: will not schedule, will accept patchesS-TolerableMinor significance, cosmetic issues, low or no impact to users.T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.good first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions