summary refs log tree commit diff
path: root/synapse/handlers/sync.py
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-05-13 11:30:22 +0100
committerMark Haines <mjark@negativecurvature.net>2016-05-13 11:30:22 +0100
commit048b3ece36ed133365ab430d5a332ba2a72d7af5 (patch)
tree4ea9951d37367a8828d3fb28ccbadb599e6beba1 /synapse/handlers/sync.py
parentMerge pull request #776 from matrix-org/markjh/lazy_signing_key (diff)
parentmissed a spot (diff)
downloadsynapse-048b3ece36ed133365ab430d5a332ba2a72d7af5.tar.xz
Merge pull request #777 from matrix-org/markjh/move_filter_for_client
move filter_events_for_client out of base handler
Diffstat (limited to 'synapse/handlers/sync.py')
-rw-r--r--synapse/handlers/sync.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index b7dcbc6b1b..921215469f 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -22,6 +22,7 @@ from synapse.util.logcontext import LoggingContext
 from synapse.util.metrics import Measure
 from synapse.util.caches.response_cache import ResponseCache
 from synapse.push.clientformat import format_push_rules_for_user
+from synapse.visibility import filter_events_for_client
 
 from twisted.internet import defer
 
@@ -697,7 +698,8 @@ class SyncHandler(BaseHandler):
 
             if recents is not None:
                 recents = sync_config.filter_collection.filter_room_timeline(recents)
-                recents = yield self.filter_events_for_client(
+                recents = yield filter_events_for_client(
+                    self.store,
                     sync_config.user.to_string(),
                     recents,
                 )
@@ -718,7 +720,8 @@ class SyncHandler(BaseHandler):
                 loaded_recents = sync_config.filter_collection.filter_room_timeline(
                     events
                 )
-                loaded_recents = yield self.filter_events_for_client(
+                loaded_recents = yield filter_events_for_client(
+                    self.store,
                     sync_config.user.to_string(),
                     loaded_recents,
                 )