summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/_base.py2
-rw-r--r--synapse/handlers/message.py8
-rw-r--r--synapse/handlers/room.py2
-rw-r--r--synapse/handlers/search.py8
-rw-r--r--synapse/handlers/sync.py4
5 files changed, 12 insertions, 12 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py
index 287024c1ca..3c5f17eb24 100644
--- a/synapse/handlers/_base.py
+++ b/synapse/handlers/_base.py
@@ -192,7 +192,7 @@ class BaseHandler(object):
         })
 
     @defer.inlineCallbacks
-    def _filter_events_for_client(self, user_id, events, is_peeking=False):
+    def filter_events_for_client(self, user_id, events, is_peeking=False):
         """
         Check which events a user is allowed to see
 
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index f51feda2f4..7d9e3cf364 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -123,7 +123,7 @@ class MessageHandler(BaseHandler):
                 "end": next_token.to_string(),
             })
 
-        events = yield self._filter_events_for_client(
+        events = yield self.filter_events_for_client(
             user_id,
             events,
             is_peeking=(member_event_id is None),
@@ -483,7 +483,7 @@ class MessageHandler(BaseHandler):
                     ]
                 ).addErrback(unwrapFirstError)
 
-                messages = yield self._filter_events_for_client(
+                messages = yield self.filter_events_for_client(
                     user_id, messages
                 )
 
@@ -619,7 +619,7 @@ class MessageHandler(BaseHandler):
             end_token=stream_token
         )
 
-        messages = yield self._filter_events_for_client(
+        messages = yield self.filter_events_for_client(
             user_id, messages, is_peeking=is_peeking
         )
 
@@ -700,7 +700,7 @@ class MessageHandler(BaseHandler):
             consumeErrors=True,
         ).addErrback(unwrapFirstError)
 
-        messages = yield self._filter_events_for_client(
+        messages = yield self.filter_events_for_client(
             user_id, messages, is_peeking=is_peeking,
         )
 
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index dd9c18df84..fdebc9c438 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -449,7 +449,7 @@ class RoomContextHandler(BaseHandler):
         now_token = yield self.hs.get_event_sources().get_current_token()
 
         def filter_evts(events):
-            return self._filter_events_for_client(
+            return self.filter_events_for_client(
                 user.to_string(),
                 events,
                 is_peeking=is_guest)
diff --git a/synapse/handlers/search.py b/synapse/handlers/search.py
index 9937d8dd7f..a937e87408 100644
--- a/synapse/handlers/search.py
+++ b/synapse/handlers/search.py
@@ -172,7 +172,7 @@ class SearchHandler(BaseHandler):
 
             filtered_events = search_filter.filter([r["event"] for r in results])
 
-            events = yield self._filter_events_for_client(
+            events = yield self.filter_events_for_client(
                 user.to_string(), filtered_events
             )
 
@@ -223,7 +223,7 @@ class SearchHandler(BaseHandler):
                     r["event"] for r in results
                 ])
 
-                events = yield self._filter_events_for_client(
+                events = yield self.filter_events_for_client(
                     user.to_string(), filtered_events
                 )
 
@@ -281,11 +281,11 @@ class SearchHandler(BaseHandler):
                     event.room_id, event.event_id, before_limit, after_limit
                 )
 
-                res["events_before"] = yield self._filter_events_for_client(
+                res["events_before"] = yield self.filter_events_for_client(
                     user.to_string(), res["events_before"]
                 )
 
-                res["events_after"] = yield self._filter_events_for_client(
+                res["events_after"] = yield self.filter_events_for_client(
                     user.to_string(), res["events_after"]
                 )
 
diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index 231140b655..b51bb651ec 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -681,7 +681,7 @@ 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 self.filter_events_for_client(
                     sync_config.user.to_string(),
                     recents,
                 )
@@ -702,7 +702,7 @@ class SyncHandler(BaseHandler):
                 loaded_recents = sync_config.filter_collection.filter_room_timeline(
                     events
                 )
-                loaded_recents = yield self._filter_events_for_client(
+                loaded_recents = yield self.filter_events_for_client(
                     sync_config.user.to_string(),
                     loaded_recents,
                 )