MatrixSynapse/synapse/handlers
Eric Eastwood 7c2a78bb3b
Marker events as state - MSC2716 (#12718)
Sending marker events as state now so they are always able to be seen by homeservers (not lost in some timeline gap).

Part of [MSC2716](https://github.com/matrix-org/matrix-spec-proposals/pull/2716)

Complement tests: https://github.com/matrix-org/complement/pull/371

As initially discussed at https://github.com/matrix-org/matrix-spec-proposals/pull/2716#discussion_r782629097 and https://github.com/matrix-org/matrix-spec-proposals/pull/2716#discussion_r876684431

When someone joins a room, process all of the marker events we see in the current state. Marker events should be sent with a unique `state_key` so that they can all resolve in the current state to easily be discovered. Marker events as state

 - If we re-use the same `state_key` (like `""`), then we would have to fetch previous snapshots of state up through time to find all of the marker events. This way we can avoid all of that. This PR was originally doing this but then thought of the smarter way to tackle in an [out of band discussion with @erikjohnston](https://docs.google.com/document/d/1JJDuPfcPNX75fprdTWlxlaKjWOdbdJylbpZ03hzo638/edit#bookmark=id.sm92fqyq7vpp).
 - Also avoids state resolution conflicts where only one of the marker events win

As a homeserver, when we see new marker state, we know there is new history imported somewhere back in time and should process it to fetch the insertion event where the historical messages are and set it as an insertion extremity. This way we know where to backfill more messages when someone asks for scrollback.
2022-05-23 20:43:37 -05:00
..
ui_auth
__init__.py
account.py
account_data.py
account_validity.py
admin.py
appservice.py
auth.py
cas.py
deactivate_account.py
device.py
devicemessage.py
directory.py Give a meaningful error message when a client tries to create a room with an invalid alias localpart. (#12779) 2022-05-18 11:46:06 +00:00
e2e_keys.py
e2e_room_keys.py
event_auth.py Add a new room version for MSC3787's knock+restricted join rule (#12623) 2022-05-17 10:41:39 +00:00
events.py
federation.py Update EventContext `get_current_event_ids` and `get_prev_event_ids` to accept state filters and update calls where possible (#12791) 2022-05-20 09:54:12 +01:00
federation_event.py Marker events as state - MSC2716 (#12718) 2022-05-23 20:43:37 -05:00
groups_local.py
identity.py
initial_sync.py
message.py Uniformize spam-checker API, part 2: check_event_for_spam (#12808) 2022-05-23 17:27:39 +00:00
oidc.py Downgrade some OIDC exceptions to warnings (#12723) 2022-05-18 20:10:21 +01:00
pagination.py Prevent expired events from being filtered out when retention is disabled (#12611) 2022-05-23 17:18:23 +00:00
password_policy.py
presence.py
profile.py
push_rules.py
read_marker.py
receipts.py
register.py
relations.py
room.py Update EventContext `get_current_event_ids` and `get_prev_event_ids` to accept state filters and update calls where possible (#12791) 2022-05-20 09:54:12 +01:00
room_batch.py Add some type hints to `event_federation` datastore (#12753) 2022-05-18 16:02:10 +01:00
room_list.py
room_member.py Update EventContext `get_current_event_ids` and `get_prev_event_ids` to accept state filters and update calls where possible (#12791) 2022-05-20 09:54:12 +01:00
room_member_worker.py
room_summary.py Add a new room version for MSC3787's knock+restricted join rule (#12623) 2022-05-17 10:41:39 +00:00
saml.py
search.py
send_email.py
set_password.py
sso.py
state_deltas.py
stats.py
sync.py Add some type hints to datastore (#12717) 2022-05-17 15:29:06 +01:00
typing.py
user_directory.py