summary refs log tree commit diff
path: root/synapse/notifier.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-01-21 16:10:37 +0000
committerErik Johnston <erik@matrix.org>2016-01-21 16:10:37 +0000
commit0e07f2e15de196076d75784f44624861b971f8e7 (patch)
tree1adb7c723ec3799317f099b5d7c28ffd35192e3d /synapse/notifier.py
parentMerge pull request #516 from matrix-org/erikj/push_perf (diff)
downloadsynapse-0e07f2e15de196076d75784f44624861b971f8e7.tar.xz
Only fetch events for rooms and receipts
Diffstat (limited to 'synapse/notifier.py')
-rw-r--r--synapse/notifier.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py
index 262a684f64..6eaa65071e 100644
--- a/synapse/notifier.py
+++ b/synapse/notifier.py
@@ -331,13 +331,13 @@ class Notifier(object):
 
     @defer.inlineCallbacks
     def get_events_for(self, user, pagination_config, timeout,
-                       only_room_events=False,
+                       only_keys=None,
                        is_guest=False, explicit_room_id=None):
         """ For the given user and rooms, return any new events for them. If
         there are no new events wait for up to `timeout` milliseconds for any
         new events to happen before returning.
 
-        If `only_room_events` is `True` only room events will be returned.
+        If `only_keys` is not None, events from keys will be sent down.
 
         If explicit_room_id is not set, the user's joined rooms will be polled
         for events.
@@ -367,7 +367,7 @@ class Notifier(object):
                 after_id = getattr(after_token, keyname)
                 if before_id == after_id:
                     continue
-                if only_room_events and name != "room":
+                if only_keys and name not in only_keys:
                     continue
                 new_events, new_key = yield source.get_new_events(
                     user=user,