summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@arasphere.net>2016-05-10 16:30:05 +0200
committerMatthew Hodgson <matthew@arasphere.net>2016-05-10 16:30:05 +0200
commitfe97b81c0929fd6cc31e8f0eb432e88ca8ccb045 (patch)
tree0c771563044691d447ea85cf3e3278ef50c07ea9 /synapse/handlers
parentMerge pull request #763 from matrix-org/erikj/ignore_user (diff)
parentMerge remote-tracking branch 'origin/develop' into dbkr/email_notifs (diff)
downloadsynapse-fe97b81c0929fd6cc31e8f0eb432e88ca8ccb045.tar.xz
Merge pull request #759 from matrix-org/dbkr/email_notifs
Send email notifications for missed messages
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 745c8901ee..2c811906d9 100644
--- a/synapse/handlers/_base.py
+++ b/synapse/handlers/_base.py
@@ -208,7 +208,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 0bb1913285..b7dcbc6b1b 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -697,7 +697,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,
                 )
@@ -718,7 +718,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,
                 )