recommends including the `m.room.create` event as one of the stripped state events:
recommends including the `m.room.create` event as one of the stripped state events:
> Join rules, invites and 3PID invites work as for a normal room, with the exception
> Join rules, invites and 3PID invites work as for a normal room, with the exception
> that `invite_state` sent along with invites should be amended to include the
> that `invite_state` sent along with invites should be amended to include the
> `m.room.create` event, to allow clients to discern whether an invite is to a
> `m.room.create` event, to allow clients to discern whether an invite is to a
> space-room or not.
> space-room or not.
## Proposal
## Proposal
@ -67,7 +67,7 @@ the following mechanisms:
* A room that has `join_rules` set to `public` or `knock`.<supid="a1">[1](#f1)</sup>
* A room that has `join_rules` set to `public` or `knock`.<supid="a1">[1](#f1)</sup>
* A room that the user is in possession of an invite to (regardless of the `join_rules`).
* A room that the user is in possession of an invite to (regardless of the `join_rules`).
Future MSCs might include additional mechanism for a user to join a room and
Future MSCs might include additional mechanism for a user to join a room and
should consider this MSC, for example:
should consider this MSC, for example:
* [MSC3083: Restricting room membership based on space membership](https://github.com/matrix-org/matrix-doc/pull/3083) proposes allowing users to join a room based on their membership in a space (as defined in [MSC1772](https://github.com/matrix-org/matrix-doc/pull/1772)).
* [MSC3083: Restricting room membership based on space membership](https://github.com/matrix-org/matrix-doc/pull/3083) proposes allowing users to join a room based on their membership in a space (as defined in [MSC1772](https://github.com/matrix-org/matrix-doc/pull/1772)).
@ -82,8 +82,8 @@ include the following as stripped state events:
* Room name (`m.room.name`)
* Room name (`m.room.name`)
* Encrypted status (`m.room.encryption`)<supid="a3">[3](#f3)</sup>
* Encrypted status (`m.room.encryption`)<supid="a3">[3](#f3)</sup>
This also implies that the above information is available to any potential joiner
This also implies that the above information is available to any potential joiner
in the API proposed in [MSC2946: Spaces summary](https://github.com/matrix-org/matrix-doc/pull/2946).
in the API proposed in [MSC2946: Spaces summary](https://github.com/matrix-org/matrix-doc/pull/2946).
I.e. rooms which could be joined due to [MSC3083](https://github.com/matrix-org/matrix-doc/pull/3083)
I.e. rooms which could be joined due to [MSC3083](https://github.com/matrix-org/matrix-doc/pull/3083)
can expose the information available in stripped state events.
can expose the information available in stripped state events.
@ -106,20 +106,20 @@ calling server to properly filter this information.
Consider that Alice and Bob share a server; Alice is a member of a space, but Bob
Consider that Alice and Bob share a server; Alice is a member of a space, but Bob
is not. The remote server will not know whether the request is on behalf of Alice
is not. The remote server will not know whether the request is on behalf of Alice
or Bob (and hence whether it should share details of private rooms within that
or Bob (and hence whether it should share details of private rooms within that
space).
space).
Trust is placed in the calling server: if there are any users on the calling
Trust is placed in the calling server: if there are any users on the calling
server in the correct space, that calling server has a right to know about the
server in the correct space, that calling server has a right to know about the
rooms in that space and should return the relevant summaries, along with enough
rooms in that space and should return the relevant summaries, along with enough
information that the calling server can then do some filtering.
information that the calling server can then do some filtering.
(The alternative, where the calling server sends the requesting `user_id`, and
(The alternative, where the calling server sends the requesting `user_id`, and
the target server does the filtering, is unattractive because it rules out a
the target server does the filtering, is unattractive because it rules out a
future world where the calling server can cache the result.)
future world where the calling server can cache the result.)
This does not decrease security since a server could lie and make a request on
This does not decrease security since a server could lie and make a request on
behalf of a user in the proper space to see the given information. I.e. the
behalf of a user in the proper space to see the given information. I.e. the