more comments

This commit is contained in:
Matthew Hodgson 2018-06-04 00:08:52 +03:00
parent 9bbb9f5556
commit 5f6122fe10

View File

@ -515,6 +515,9 @@ class SyncHandler(object):
if not types: if not types:
# an optimisation to stop needlessly trying to calculate # an optimisation to stop needlessly trying to calculate
# member_state_ids # member_state_ids
#
# XXX: i can't remember what this trying to do. why would
# types ever be []? --matthew
lazy_load_members = False lazy_load_members = False
types.append((None, None)) # don't just filter to room members types.append((None, None)) # don't just filter to room members
@ -568,6 +571,10 @@ class SyncHandler(object):
) )
if lazy_load_members: if lazy_load_members:
# TODO: filter out redundant members based on their event_ids
# (not mxids) at this point. In practice, limited syncs are
# relatively rare so it's not a total disaster to send redundant
# members down at this point.
member_state_ids = { member_state_ids = {
t: state_at_timeline_start[t] t: state_at_timeline_start[t]
for t in state_at_timeline_start if t[0] == EventTypes.Member for t in state_at_timeline_start if t[0] == EventTypes.Member