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

Commit

Permalink
Merge pull request #4309 from KB1RD/KB1RD-fixes
Browse files Browse the repository at this point in the history
Fix the variable names used for account_data
  • Loading branch information
richvdh authored Dec 19, 2018
2 parents 7e22cd9 + da8628b commit 3b2ba2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/4309.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed per-room account data filters
10 changes: 7 additions & 3 deletions synapse/handlers/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -1668,13 +1668,17 @@ def _generate_room_entry(self, sync_result_builder, ignored_users,
"content": content,
})

account_data = sync_config.filter_collection.filter_room_account_data(
account_data_events = sync_config.filter_collection.filter_room_account_data(
account_data_events
)

ephemeral = sync_config.filter_collection.filter_room_ephemeral(ephemeral)

if not (always_include or batch or account_data or ephemeral or full_state):
if not (always_include
or batch
or account_data_events
or ephemeral
or full_state):
return

state = yield self.compute_state_delta(
Expand Down Expand Up @@ -1745,7 +1749,7 @@ def _generate_room_entry(self, sync_result_builder, ignored_users,
room_id=room_id,
timeline=batch,
state=state,
account_data=account_data,
account_data=account_data_events,
)
if room_sync or always_include:
sync_result_builder.archived.append(room_sync)
Expand Down

0 comments on commit 3b2ba2f

Please sign in to comment.