Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec does not say which rooms are returned from /hierarchy #1184

Open
richvdh opened this issue Jul 26, 2022 · 7 comments · May be fixed by #2064
Open

spec does not say which rooms are returned from /hierarchy #1184

richvdh opened this issue Jul 26, 2022 · 7 comments · May be fixed by #2064
Assignees
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit

Comments

@richvdh
Copy link
Member

richvdh commented Jul 26, 2022

According to MSC2946, "Any room that is ... potentially joinable (per MSC3173) is returned". This doesn't seem to be reflected at https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv1roomsroomidhierarchy.

@richvdh richvdh changed the title spec does not say which rooms are returned from /hierarchy According to [MSC2946](https://github.com/matrix-org/matrix-spec-proposals/blob/main/proposals/2946-spaces-summary.md#client-server-api), Any room that is ... potentially joinable is returned. This doesn't seem to be reflected at https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv1roomsroomidhierarchy. spec does not say which rooms are returned from /hierarchy Jul 26, 2022
@richvdh
Copy link
Member Author

richvdh commented Jul 26, 2022

In particular: are rooms with an invite or knock join rule returned?

@clokep
Copy link
Member

clokep commented Jul 26, 2022

In particular: are rooms with an invite or knock join rule returned?

If the user has a pending invite they can see the room: https://github.com/matrix-org/synapse/blob/6236afc621925cd01b67cf026cb28b4f7bd0384e/synapse/handlers/room_summary.py#L585-L606

Knockable rooms are also shown: https://github.com/matrix-org/synapse/blob/6236afc621925cd01b67cf026cb28b4f7bd0384e/synapse/handlers/room_summary.py#L565-L573

This was definitely the intention of those lines in MSC2946, I can try to dig up old threads in the PR if you want.

@richvdh
Copy link
Member Author

richvdh commented Jul 26, 2022

Thanks for the clarifications @clokep.

It's somewhat surprising to me that changing the join rule to knock means that more information is returned to uninvited users than for an invite room, and it feels like that might catch users off-guard too?

@clokep
Copy link
Member

clokep commented Jul 26, 2022

It's somewhat surprising to me that changing the join rule to knock means that more information is returned to uninvited users than for an invite room, and it feels like that might catch users off-guard too?

I think knock rooms are generally thought to be "findable" and that's why they're returned. This fits pretty well into the description of discoverability given in MSC2403. If a room is knockable the implication is that you want people to find it, but they must ask to join it.

(I should also note that if the user has a pending invite the room will be returned regardless of the join rule, which I think is reasonable.)

@richvdh
Copy link
Member Author

richvdh commented Jul 26, 2022

Let's take discussion of whether that behaviour is correct to #1186.

@turt2live turt2live added the clarification An area where the expected behaviour is understood, but the spec could do with being more explicit label Jul 27, 2022
@richvdh
Copy link
Member Author

richvdh commented Jan 10, 2025

Conclusion of #1186 was that we're fine for knockable rooms to be returned by /hierarchy. So this is just a spec clarification issue.

@clokep
Copy link
Member

clokep commented Jan 15, 2025

So this was actually defined in MSC3173:

This MSC [...] formalizes who can access the stripped state of a room in future cases.

Potential ways that a user might be able to join a room include, but are not limited to, the following mechanisms:

  • A room that has join_rules set to public or knock.
  • A room that the user is in possession of an invite to (regardless of the join_rules).

Seems like #3606 missed this part of the MSC?

Note that Synapse also returns rooms with world_readable set to true. This seems ok since the state is allowed by anyone, but isn't well defined and is mentioned in MSC3173 also, probably should have been a separate bullet though.

@clokep clokep linked a pull request Jan 24, 2025 that will close this issue
@clokep clokep self-assigned this Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification An area where the expected behaviour is understood, but the spec could do with being more explicit
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants