mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Add comment to sync as to why code path is split
This commit is contained in:
parent
e2accd7f1d
commit
d26bec8a43
@ -354,6 +354,11 @@ class SyncHandler(object):
|
|||||||
since_key = since_token.room_key
|
since_key = since_token.room_key
|
||||||
|
|
||||||
while limited and len(recents) < timeline_limit and max_repeat:
|
while limited and len(recents) < timeline_limit and max_repeat:
|
||||||
|
# If we have a since_key then we are trying to get any events
|
||||||
|
# that have happened since `since_key` up to `end_key`, so we
|
||||||
|
# can just use `get_room_events_stream_for_room`.
|
||||||
|
# Otherwise, we want to return the last N events in the room
|
||||||
|
# in toplogical ordering.
|
||||||
if since_key:
|
if since_key:
|
||||||
events, end_key = yield self.store.get_room_events_stream_for_room(
|
events, end_key = yield self.store.get_room_events_stream_for_room(
|
||||||
room_id,
|
room_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user