mirror of
https://github.com/element-hq/synapse.git
synced 2026-07-18 11:47:30 +00:00
Use org.matrix.msc3871.gaps
This commit is contained in:
@@ -861,7 +861,7 @@ async def encode_messages_response(
|
||||
bundle_aggregations=get_messages_result.bundled_aggregations,
|
||||
)
|
||||
),
|
||||
"gaps": [
|
||||
"org.matrix.msc3871.gaps": [
|
||||
{
|
||||
"prev_pagination_token": await get_messages_result.start_token.copy_and_replace(
|
||||
StreamKeyType.ROOM, gap.prev_token
|
||||
|
||||
@@ -2530,7 +2530,7 @@ class RoomMessageListTestCase(RoomBase):
|
||||
# Make sure the gaps are correct
|
||||
actual_gaps = [
|
||||
event_id_to_message_map.get(gap["event_id"], gap["event_id"])
|
||||
for gap in channel.json_body["gaps"]
|
||||
for gap in channel.json_body["org.matrix.msc3871.gaps"]
|
||||
]
|
||||
expected_gaps = expected_messages
|
||||
# We only need to assert that gaps are in the list (the order doesn't matter)
|
||||
@@ -2540,7 +2540,7 @@ class RoomMessageListTestCase(RoomBase):
|
||||
exact=True,
|
||||
)
|
||||
# Ensure that the tokens point to the correct positions
|
||||
for gap in channel.json_body["gaps"]:
|
||||
for gap in channel.json_body["org.matrix.msc3871.gaps"]:
|
||||
event_room_stream_token = self.get_success(
|
||||
self.store.get_topological_token_for_event(gap["event_id"])
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user