From 7469fa7585f9e520344d58947ea617fdfa6bfa62 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 5 Jan 2024 13:03:20 +0000 Subject: Simplify internal metadata class. (#16762) We remove these fields as they're just duplicating data the event already stores, and (for reasons :shushing_face:) I'd like to simplify the class to only store simple types. I'm not entirely convinced that we shouldn't instead add helper methods to the event class to generate stream tokens, but I don't really think that's where they belong either --- synapse/handlers/admin.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'synapse/handlers/admin.py') diff --git a/synapse/handlers/admin.py b/synapse/handlers/admin.py index 9a4af3c45f..db80345b94 100644 --- a/synapse/handlers/admin.py +++ b/synapse/handlers/admin.py @@ -208,7 +208,12 @@ class AdminHandler: if not events: break - from_key = events[-1].internal_metadata.after + last_event = events[-1] + assert last_event.internal_metadata.stream_ordering + from_key = RoomStreamToken( + stream=last_event.internal_metadata.stream_ordering, + topological=last_event.depth, + ) events = await filter_events_for_client( self._storage_controllers, user_id, events -- cgit 1.5.1