Skip to content

Commit b1051e4

Browse files
committed
Various clarifications based on feedback.
1 parent d069ca2 commit b1051e4

File tree

1 file changed

+36
-15
lines changed

1 file changed

+36
-15
lines changed

proposals/3173-expose-stripped-state-events.md

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# MSC3173: Expose stripped state events to any potential joiner
22

3-
It is currently possible to inspect the state of rooms in some circumstances:
3+
The current design of Matrix somtimes allows for inspecting part of the room state
4+
without being joined to the room:
45

56
* If the room has `history_visibility: world_readable`, then anyone can inspect
67
it (by calling `/state` on it).
7-
* Rooms in the room directory expose some of their state publicly.
8+
* Rooms in the [room directory](https://matrix.org/docs/spec/client_server/latest#get-matrix-client-r0-publicrooms)
9+
expose some of their state publicly.
810
* [Invited users](https://matrix.org/docs/spec/server_server/r0.1.4#put-matrix-federation-v2-invite-roomid-eventid)
9-
(and [knocking users](https://github.com/matrix-org/matrix-doc/pull/2403))
10-
receive stripped state events.
11+
and [knocking users](https://github.com/matrix-org/matrix-doc/pull/2403)
12+
receive stripped state events to display metadata to users.
1113

12-
This MSC proposes exposing the stripped state events that are currently available
14+
This MSC proposes allowing the stripped state events that are currently available
1315
to invited and knocking users to any user who could potentially join a room. It
1416
also consolidates the recommendation on which states events are available to
1517
potential joiners.
@@ -62,10 +64,13 @@ recommends including the `m.room.create` event as one of the stripped state even
6264
6365
## Proposal
6466

65-
Any user who is able to join a room can access the stripped state events of that room.
67+
Any user who is able to join a room shall be allowed to have access the stripped
68+
state events of that room. No changes are proposed to the mechanics of how the
69+
users may get those state events, e.g. the `invite_state` of an invite or the
70+
roomd irectory.
6671

67-
Potential ways that a user might be able to join include, but are not limited to,
68-
the following mechanisms:
72+
Potential ways that a user might be able to join a room include, but are not
73+
limited to, the following mechanisms:
6974

7075
* A room that has `join_rules` set to `public` or `knock`.
7176
* A room that the user is in possession of an invite to (regardless of the `join_rules`).
@@ -77,8 +82,10 @@ should consider this MSC, for example:
7782
proposes allowing users to join a room based on their membership in a space (as defined in
7883
[MSC1772](https://github.com/matrix-org/matrix-doc/pull/1772)).
7984

80-
Additionally, it is recommended, but not required, that homeserver implementations
81-
include the following as stripped state events:
85+
It is also proposed to create a single definition for what stripped state events
86+
should be provided to be potential joiners. Thus, it is recommended (although not
87+
required<sup id="a0">[0](#f0)</sup>) that homeserver implementations include the
88+
following as stripped state events:
8289

8390
* Create event (`m.room.create`)<sup id="a1">[1](#f1)</sup>
8491
* Join rules (`m.room.join_rules`)
@@ -88,11 +95,6 @@ include the following as stripped state events:
8895
* Encryption information (`m.room.encryption`)<sup id="a2">[2](#f2)</sup>
8996
* Room topic (`m.room.topic`)<sup id="a3">[3](#f3)</sup>
9097

91-
This also implies that the above information is available to any potential joiner
92-
in the API proposed in [MSC2946: Spaces summary](https://github.com/matrix-org/matrix-doc/pull/2946).
93-
E.g. rooms which could be joined due to [MSC3083](https://github.com/matrix-org/matrix-doc/pull/3083)
94-
can expose the information available in stripped state events.
95-
9698
## Potential issues
9799

98100
This is a generalization of current behavior and shouldn't introduce any new issues.
@@ -112,16 +114,35 @@ seem to be a major weakening of the security.
112114

113115
## Future extensions
114116

117+
### Dedicated APIs
118+
115119
Dedicated client-server and server-server APIs could be added to request the
116120
stripped state events, but that is considered out-of-scope for the current
117121
proposal.
118122

123+
### Revisions to the room directory
124+
125+
A future MSC could include additional information from the stripped state events
126+
in the [room directory](https://matrix.org/docs/spec/client_server/latest#get-matrix-client-r0-publicrooms).
127+
This seems to mostly be the encryption information, but there may also be other
128+
pieces of information to include.
129+
130+
### Additional ways to join a room
131+
132+
[MSC3083](https://github.com/matrix-org/matrix-doc/pull/3083) leverages this to
133+
expose the information available in stripped state events via the spaces summary
134+
for potential joiners due to membership in a space.
135+
119136
## Unstable prefix
120137

121138
N/A
122139

123140
## Footnotes
124141

142+
<a id="f0"/>[0]: Privacy conscious deployments may wish to limit the metadata
143+
available to users who are not in a room as the trade-off against user experience.
144+
There seems to be no reason to not allow this. [](#a0)
145+
125146
<a id="f1"/>[1]: As updated in [MSC1772](https://github.com/matrix-org/matrix-doc/pull/1772). [](#a1)
126147

127148
<a id="f2"/>[2]: The encryption information (`m.room.encryption`) is already sent

0 commit comments

Comments
 (0)