From 668e6625b0ec1c9dde0f81713c2c4a4f5a62f5b0 Mon Sep 17 00:00:00 2001 From: Nathan Pennie Date: Wed, 19 Dec 2018 06:53:02 -0500 Subject: [PATCH 1/3] Fix the variable names used for account_data --- synapse/handlers/sync.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py index 09739f286..6d2b4096a 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py @@ -1668,13 +1668,13 @@ class SyncHandler(object): "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( @@ -1745,7 +1745,7 @@ class SyncHandler(object): 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) From 81b513416e6ff1a9f15622b158c2f0227db80872 Mon Sep 17 00:00:00 2001 From: Nathan Pennie Date: Wed, 19 Dec 2018 14:12:33 -0500 Subject: [PATCH 2/3] Fixed line length --- synapse/handlers/sync.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py index 6d2b4096a..f7f768f75 100644 --- a/synapse/handlers/sync.py +++ b/synapse/handlers/sync.py @@ -1674,7 +1674,11 @@ class SyncHandler(object): ephemeral = sync_config.filter_collection.filter_room_ephemeral(ephemeral) - if not (always_include or batch or account_data_events 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( From da8628ba2c14a1e415ef653418318c9a118fdf71 Mon Sep 17 00:00:00 2001 From: Nathan Pennie Date: Wed, 19 Dec 2018 14:42:49 -0500 Subject: [PATCH 3/3] Create 4309.bugfix --- changelog.d/4309.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/4309.bugfix diff --git a/changelog.d/4309.bugfix b/changelog.d/4309.bugfix new file mode 100644 index 000000000..93b3a4f30 --- /dev/null +++ b/changelog.d/4309.bugfix @@ -0,0 +1 @@ +Fixed per-room account data filters