mirror of
https://github.com/element-hq/synapse
synced 2024-10-02 08:02:41 +00:00
Fix lint
This commit is contained in:
parent
9791209a3d
commit
70ecd4d8d3
1 changed files with 10 additions and 12 deletions
|
@ -774,6 +774,13 @@ class SlidingSyncHandler:
|
|||
)
|
||||
)
|
||||
|
||||
timeline_events, new_room_key = await self.store.paginate_room_events(
|
||||
room_id=room_id,
|
||||
# We're going to paginate backwards from the `to_token`
|
||||
from_key=to_token.room_key,
|
||||
to_key=(
|
||||
# Determine whether we should limit the timeline to the token range.
|
||||
#
|
||||
# We should return historical messages (before token range) in the
|
||||
# following cases because we want clients to be able to show a basic
|
||||
# screen of information:
|
||||
|
@ -781,17 +788,8 @@ class SlidingSyncHandler:
|
|||
# - When users `newly_joined`
|
||||
# - TODO: For an incremental sync where we haven't sent it down this
|
||||
# connection before
|
||||
should_limit_timeline_to_token_range = (
|
||||
from_token is not None and not newly_joined
|
||||
)
|
||||
|
||||
timeline_events, new_room_key = await self.store.paginate_room_events(
|
||||
room_id=room_id,
|
||||
# We're going to paginate backwards from the `to_token`
|
||||
from_key=to_token.room_key,
|
||||
to_key=(
|
||||
from_token.room_key
|
||||
if should_limit_timeline_to_token_range
|
||||
if from_token is not None and not newly_joined
|
||||
else None
|
||||
),
|
||||
direction=Direction.BACKWARDS,
|
||||
|
|
Loading…
Reference in a new issue