<commit_before>Room History Visibility
=======================

The visibility of events to users before they joined can be controlled by the
``m.room.history_visibility`` state event.

More specifically, the string value of the content key ``history_visibility``
controls the visibility of events. The valid values are:

- ``shared``
- ``invited``
- ``joined``

By default, ``history_visibility`` is set to ``shared``.

The rules governing whether a user is allowed to see an event depend solely on
the state at that event:

1. If the user was joined, allow.
2. If the user was invited and the ``history_visibility`` was set to
   ``invited`` or ``shared``, allow.
3. If the user was neither invited nor joined but the ``history_visibility``
   was set to ``shared``, allow.
4. Otherwise, deny.

<commit_msg>Make it clearer<commit_after>Room History Visibility
=======================

Whether a member of a room can see the events that happened in a room from
before they joined the room is controlled by the ``history_visibility`` key
of the ``m.room.history_visibility`` state event. The valid values for
``history_visibility`` are:

- ``shared``
- ``invited``
- ``joined``

By default if no ``history_visibility`` is set it is assumed to be ``shared``.

The rules governing whether a user is allowed to see an event depend solely on
the state of the room at that event:

1. If the user was joined, allow.
2. If the user was invited and the ``history_visibility`` was set to
   ``invited`` or ``shared``, allow.
3. If the user was neither invited nor joined but the ``history_visibility``
   was set to ``shared``, allow.
4. Otherwise, deny.


{'fraction_non_alphanumeric': 0.1196114146933819, 'fraction_numerical': 0.004857316332726169, 'mean_word_length': 4.456953642384106, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3298724', 'n_tokens_mistral': 455, 'n_tokens_neox': 436, 'n_words': 237}