Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit b1580f5

Browse files
authored
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
1 parent 9fbaed3 commit b1580f5

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

changelog.d/3760.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Don't return non-LL-member state in incremental sync state blocks

synapse/handlers/sync.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,9 +745,16 @@ def compute_state_delta(self, room_id, batch, sync_config, since_token, now_toke
745745
state_ids = {}
746746
if lazy_load_members:
747747
if types:
748+
# We're returning an incremental sync, with no "gap" since
749+
# the previous sync, so normally there would be no state to return
750+
# But we're lazy-loading, so the client might need some more
751+
# member events to understand the events in this timeline.
752+
# So we fish out all the member events corresponding to the
753+
# timeline here, and then dedupe any redundant ones below.
754+
748755
state_ids = yield self.store.get_state_ids_for_event(
749756
batch.events[0].event_id, types=types,
750-
filtered_types=filtered_types,
757+
filtered_types=None, # we only want members!
751758
)
752759

753760
if lazy_load_members and not include_redundant_members:

0 commit comments

Comments
 (0)