anonymousland-synapse/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 Fix typo in some instances of enable_registration_token_3pid_bypass. (#12639) 2022-05-05 07:11:52 -04:00
__init__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
account_data.py Add StreamKeyType class and replace string literals with constants (#12567) 2022-05-16 15:35:31 +00:00
account_validity.py Implement cancellation support/protection for module callbacks (#12568) 2022-05-09 12:31:14 +01:00
account.py Optionally include account validity in MSC3720 account status responses (#12266) 2022-03-24 11:19:41 +01:00
admin.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
appservice.py Add StreamKeyType class and replace string literals with constants (#12567) 2022-05-16 15:35:31 +00:00
auth.py Implement cancellation support/protection for module callbacks (#12568) 2022-05-09 12:31:14 +01:00
cas.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
deactivate_account.py Add third_party module callbacks to check if a user can delete a room and deactivate a user (#12028) 2022-03-09 18:23:57 +00:00
device.py Add StreamKeyType class and replace string literals with constants (#12567) 2022-05-16 15:35:31 +00:00
devicemessage.py Add StreamKeyType class and replace string literals with constants (#12567) 2022-05-16 15:35:31 +00:00
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 Another batch of type annotations (#12726) 2022-05-13 12:35:31 +01:00
e2e_room_keys.py Refactor and convert Linearizer to async (#12357) 2022-04-05 15:43:52 +01:00
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 remove constantly lib use and switch to enums. (#12624) 2022-05-04 11:26:11 +00:00
federation_event.py Marker events as state - MSC2716 (#12718) 2022-05-23 20:43:37 -05:00
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
groups_local.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
identity.py Use getClientAddress instead of getClientIP. (#12599) 2022-05-04 14:11:21 -04:00
initial_sync.py Add StreamKeyType class and replace string literals with constants (#12567) 2022-05-16 15:35:31 +00:00
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 Use direct references for some configuration variables (part 3) (#10885) 2021-09-23 07:13:34 -04:00
presence.py Add StreamKeyType class and replace string literals with constants (#12567) 2022-05-16 15:35:31 +00:00
profile.py Always allow the empty string as an avatar_url. (#12261) 2022-03-25 13:28:42 +00:00
push_rules.py Add a module API to allow modules to edit push rule actions (#12406) 2022-04-27 13:55:33 +00:00
read_marker.py Refactor and convert Linearizer to async (#12357) 2022-04-05 15:43:52 +01:00
receipts.py Add StreamKeyType class and replace string literals with constants (#12567) 2022-05-16 15:35:31 +00:00
register.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
relations.py Consolidate logic for parsing relations. (#12693) 2022-05-16 12:42:45 +00:00
room_batch.py Add some type hints to event_federation datastore (#12753) 2022-05-18 16:02:10 +01:00
room_list.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
room_member_worker.py Implement knock feature (#6739) 2021-06-09 19:39:51 +01:00
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_summary.py Add a new room version for MSC3787's knock+restricted join rule (#12623) 2022-05-17 10:41:39 +00:00
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
saml.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
search.py Add StreamKeyType class and replace string literals with constants (#12567) 2022-05-16 15:35:31 +00:00
send_email.py Remove unnecessary ignores due to Twisted upgrade. (#11939) 2022-02-08 09:15:59 -05:00
set_password.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
sso.py Use getClientAddress instead of getClientIP. (#12599) 2022-05-04 14:11:21 -04:00
state_deltas.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
stats.py Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
sync.py Add some type hints to datastore (#12717) 2022-05-17 15:29:06 +01:00
typing.py Add StreamKeyType class and replace string literals with constants (#12567) 2022-05-16 15:35:31 +00:00
user_directory.py Add the update_user_directory_from_worker configuration option (superseding update_user_directory) to allow a generic worker to be designated as the worker to update the user directory. (#12654) 2022-05-10 11:08:45 +01:00