Skip to content

Commit

Permalink
Update synapse/handlers/room.py
Browse files Browse the repository at this point in the history
Co-authored-by: reivilibre <[email protected]>
  • Loading branch information
erikjohnston and reivilibre authored Jan 5, 2024
1 parent d42000a commit 208c287
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion synapse/handlers/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,7 @@ async def get_new_events(

# We know stream_ordering must be not None here, as its been
# persisted, but mypy doesn't know that
events.sort(key=lambda e: e.internal_metadata.stream_ordering or 0)
events.sort(key=lambda e: cast(int, e.internal_metadata.stream_ordering))

if limit:
events[:] = events[:limit]
Expand Down

0 comments on commit 208c287

Please sign in to comment.