Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit ab8011b

Browse files
committed
Some marker event implemntation trials
1 parent 66cf5be commit ab8011b

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

scripts-dev/complement.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ if [[ -n "$1" ]]; then
6565
fi
6666

6767
# Run the tests!
68-
go test -v -tags synapse_blacklist,msc2946,msc3083,msc2716,msc2403 -count=1 $EXTRA_COMPLEMENT_ARGS ./tests -run TestBackfillingHistory
68+
go test -v -tags synapse_blacklist,msc2946,msc3083,msc2716,msc2403 -count=1 $EXTRA_COMPLEMENT_ARGS ./tests -run TestBackfillingHistory/parallel/Historical_messages_are_visible_when_already_joined_on_federated_server

synapse/api/constants.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,6 @@ class EventContentFields:
196196
MSC2716_CHUNK_ID = "org.matrix.msc2716.chunk_id"
197197
# For "marker" events
198198
MSC2716_MARKER_INSERTION = "org.matrix.msc2716.marker.insertion"
199-
MSC2716_MARKER_INSERTION_PREV_EVENTS = (
200-
"org.matrix.msc2716.marker.insertion_prev_events"
201-
)
202199

203200

204201
class RoomTypes:

synapse/storage/databases/main/events.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1819,10 +1819,24 @@ def _handle_marker_event(self, txn, event):
18191819
# TODO: We should attempt to backfill the insertion event instead
18201820
# of trying to pack all of the info in the marker event. Otherwise,
18211821
# we need to pack in the insertion_prev_events and insertion_next_chunk_id.
1822+
# GET /_matrix/federation/v1/event/{eventId}
18221823

1823-
# insertion_event_id = event.content.get(
1824-
# EventContentFields.MSC2716_MARKER_INSERTION
1824+
insertion_event_id = event.content.get(
1825+
EventContentFields.MSC2716_MARKER_INSERTION
1826+
)
1827+
1828+
# We will trust that the application service sending the marker event is
1829+
# also the one that knows about the insertion event
1830+
# insertion_event_origin = get_domain_from_id(event.sender)
1831+
# m_ev = await self.federation_client.get_event(
1832+
# [insertion_event_origin],
1833+
# insertion_event_id,
1834+
# outlier=True,
1835+
# timeout=10000,
18251836
# )
1837+
# _auth_and_persist_events
1838+
# handle_new_client_event
1839+
18261840
# insertion_prev_event_ids = event.content.get(
18271841
# EventContentFields.MSC2716_MARKER_INSERTION_PREV_EVENTS
18281842
# )

0 commit comments

Comments
 (0)