Only work out newly_joined_users for incremental sync

This commit is contained in:
Erik Johnston 2016-05-24 11:21:34 +01:00
parent b08ad0389e
commit 1c5ed2a19b

View File

@ -699,8 +699,11 @@ class SyncHandler(object):
# Now we want to get any newly joined users # Now we want to get any newly joined users
newly_joined_users = set() newly_joined_users = set()
if sync_result_builder.since_token:
for joined_sync in sync_result_builder.joined: for joined_sync in sync_result_builder.joined:
it = itertools.chain(joined_sync.timeline.events, joined_sync.state.values()) it = itertools.chain(
joined_sync.timeline.events, joined_sync.state.values()
)
for event in it: for event in it:
if event.type == EventTypes.Member: if event.type == EventTypes.Member:
if event.membership == Membership.JOIN: if event.membership == Membership.JOIN: