forked from MirrorHub/synapse
don't return non-LL-member state in incremental sync state blocks (#3760)
don't return non-LL-member state in incremental sync state blocks
This commit is contained in:
parent
9fbaed325f
commit
b1580f50fe
2 changed files with 9 additions and 1 deletions
1
changelog.d/3760.bugfix
Normal file
1
changelog.d/3760.bugfix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Don't return non-LL-member state in incremental sync state blocks
|
|
@ -745,9 +745,16 @@ class SyncHandler(object):
|
||||||
state_ids = {}
|
state_ids = {}
|
||||||
if lazy_load_members:
|
if lazy_load_members:
|
||||||
if types:
|
if types:
|
||||||
|
# We're returning an incremental sync, with no "gap" since
|
||||||
|
# the previous sync, so normally there would be no state to return
|
||||||
|
# But we're lazy-loading, so the client might need some more
|
||||||
|
# member events to understand the events in this timeline.
|
||||||
|
# So we fish out all the member events corresponding to the
|
||||||
|
# timeline here, and then dedupe any redundant ones below.
|
||||||
|
|
||||||
state_ids = yield self.store.get_state_ids_for_event(
|
state_ids = yield self.store.get_state_ids_for_event(
|
||||||
batch.events[0].event_id, types=types,
|
batch.events[0].event_id, types=types,
|
||||||
filtered_types=filtered_types,
|
filtered_types=None, # we only want members!
|
||||||
)
|
)
|
||||||
|
|
||||||
if lazy_load_members and not include_redundant_members:
|
if lazy_load_members and not include_redundant_members:
|
||||||
|
|
Loading…
Reference in a new issue