Allow history to be noted as world-readable

SPEC-237
pull/977/head
Daniel Wagner-Hall 9 years ago
parent 0639f885df
commit 67880686d5

@ -1,7 +1,7 @@
{ {
"type": "object", "type": "object",
"title": "Controls visibility of history.", "title": "Controls visibility of history.",
"description": "This event controls whether a member of a room can see the events that happened in a room from before they joined.", "description": "This event controls whether a user can see the events that happened in a room from before they joined.",
"allOf": [{ "allOf": [{
"$ref": "core-event-schema/state_event.json" "$ref": "core-event-schema/state_event.json"
}], }],
@ -12,7 +12,7 @@
"history_visibility": { "history_visibility": {
"type": "string", "type": "string",
"description": "Who can see the room history.", "description": "Who can see the room history.",
"enum": ["invited","joined","shared"] "enum": ["invited","joined","shared","world_readable"]
} }
}, },
"required": ["history_visibility"] "required": ["history_visibility"]

@ -6,14 +6,14 @@ Room History Visibility
This module adds support for controlling the visibility of previous events in a This module adds support for controlling the visibility of previous events in a
room. room.
In all cases, a user needs to join a room to view events in that room. Once they In all cases except ``world_readable``, a user needs to join a room to view events in that room. Once they
have joined a room, they will gain access to a subset of events in the room. How have joined a room, they will gain access to a subset of events in the room. How
this subset is chosen is controlled by the ``m.room.history_visibility`` event this subset is chosen is controlled by the ``m.room.history_visibility`` event
outlined below. After a user has left a room, they may seen any events which they outlined below. After a user has left a room, they may seen any events which they
were allowed to see before they left the room, but no events received after they were allowed to see before they left the room, but no events received after they
left. left.
The three options for the ``m.room.history_visibility`` event are: The four options for the ``m.room.history_visibility`` event are:
- ``shared`` - Previous events are always accessible to newly joined members. All - ``shared`` - Previous events are always accessible to newly joined members. All
events in the room are accessible, even those sent when the member was not a part events in the room are accessible, even those sent when the member was not a part
@ -24,6 +24,9 @@ The three options for the ``m.room.history_visibility`` event are:
- ``joined`` - Previous events are accessible to newly joined members from the point - ``joined`` - Previous events are accessible to newly joined members from the point
they joined the room onwards. Events stop being accessible when the member's state they joined the room onwards. Events stop being accessible when the member's state
changes to something other than ``join``. changes to something other than ``join``.
- ``world_readable`` - All events while this is the ``m.room.history_visibility`` value
may be shared by any participating homeserver with anyone, regardless of whether
they have ever joined the room.
.. WARNING:: .. WARNING::
These options are applied at the point an event is *sent*. Checks are These options are applied at the point an event is *sent*. Checks are
@ -43,10 +46,13 @@ Client behaviour
Clients that implement this module MUST present to the user the possible options Clients that implement this module MUST present to the user the possible options
for setting history visibility when creating a room. for setting history visibility when creating a room.
Clients may want to display a notice that their events may be read by non-joined
people if the value is set to ``world_readable``.
Server behaviour Server behaviour
---------------- ----------------
By default if no ``history_visibility`` is set the visibility is assumed to be By default if no ``history_visibility`` is set, or if the value is not understood, the visibility is assumed to be
``shared``. The rules governing whether a user is allowed to see an event depend ``shared``. The rules governing whether a user is allowed to see an event depend
solely on the state of the room *at that event*: solely on the state of the room *at that event*:

Loading…
Cancel
Save