This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree 2 files changed +8
-10
lines changed
2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -175,12 +175,11 @@ async def get_state_events(
175
175
state_filter = state_filter or StateFilter .all ()
176
176
177
177
if at_token :
178
- # FIXME this claims to get the state at a stream position, but
179
- # get_recent_events_for_room operates by topo ordering. This therefore
180
- # does not reliably give you the state at the given stream position.
181
- # (https://github.com/matrix-org/synapse/issues/3305)
182
178
last_events , _ = await self .store .get_recent_events_for_room (
183
- room_id , end_token = at_token .room_key , limit = 1
179
+ room_id ,
180
+ end_token = at_token .room_key ,
181
+ limit = 1 ,
182
+ order_by = "stream" ,
184
183
)
185
184
186
185
if not last_events :
Original file line number Diff line number Diff line change @@ -683,12 +683,11 @@ async def get_state_at(
683
683
stream_position: point at which to get state
684
684
state_filter: The state filter used to fetch state from the database.
685
685
"""
686
- # FIXME this claims to get the state at a stream position, but
687
- # get_recent_events_for_room operates by topo ordering. This therefore
688
- # does not reliably give you the state at the given stream position.
689
- # (https://github.com/matrix-org/synapse/issues/3305)
690
686
last_events , _ = await self .store .get_recent_events_for_room (
691
- room_id , end_token = stream_position .room_key , limit = 1
687
+ room_id ,
688
+ end_token = stream_position .room_key ,
689
+ limit = 1 ,
690
+ order_by = "stream" ,
692
691
)
693
692
694
693
if last_events :
You can’t perform that action at this time.
0 commit comments