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

Commit

Permalink
Calculate rooms changed for device lists to work. (#14810)
Browse files Browse the repository at this point in the history
Back-out some changes from 7e582a2
(#14786) which skipped necessary logic to calculate device lists properly.
  • Loading branch information
clokep committed Jan 11, 2023
1 parent f417fb8 commit 3952297
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
1 change: 1 addition & 0 deletions changelog.d/14810.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug introduced in Synapse 1.75.0rc1 where device lists could be miscalculated with some sync filters.
3 changes: 0 additions & 3 deletions synapse/api/filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,6 @@ async def filter_room_account_data(
await self._room_filter.filter(events)
)

def blocks_all_rooms(self) -> bool:
return self._room_filter.filters_all_rooms()

def blocks_all_presence(self) -> bool:
return (
self._presence_filter.filters_all_types()
Expand Down
4 changes: 0 additions & 4 deletions synapse/handlers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -1793,10 +1793,6 @@ async def _generate_sync_entry_for_rooms(
- newly_left_users
"""

# If the request doesn't care about rooms then nothing to do!
if sync_result_builder.sync_config.filter_collection.blocks_all_rooms():
return set(), set(), set(), set()

since_token = sync_result_builder.since_token

# 1. Start by fetching all ephemeral events in rooms we've joined (if required).
Expand Down

0 comments on commit 3952297

Please sign in to comment.