summary refs log tree commit diff
path: root/synapse/app/pusher.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-10-17 11:08:23 +0100
committerErik Johnston <erik@matrix.org>2016-10-17 11:10:37 +0100
commit816988baaa31210b36c49ad207eecf30d0223595 (patch)
tree7f10b3a6a890d4bbb7d33a76d5f26e0acc2b7497 /synapse/app/pusher.py
parentDrop some unused indices (diff)
parentMerge pull request #1162 from larroy/master (diff)
downloadsynapse-816988baaa31210b36c49ad207eecf30d0223595.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/remove_auth
Diffstat (limited to 'synapse/app/pusher.py')
-rw-r--r--synapse/app/pusher.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/app/pusher.py b/synapse/app/pusher.py
index 8d755a4b33..1a6f5507a9 100644
--- a/synapse/app/pusher.py
+++ b/synapse/app/pusher.py
@@ -197,7 +197,7 @@ class PusherServer(HomeServer):
                     yield start_pusher(user_id, app_id, pushkey)
 
             stream = results.get("events")
-            if stream:
+            if stream and stream["rows"]:
                 min_stream_id = stream["rows"][0][0]
                 max_stream_id = stream["position"]
                 preserve_fn(pusher_pool.on_new_notifications)(
@@ -205,7 +205,7 @@ class PusherServer(HomeServer):
                 )
 
             stream = results.get("receipts")
-            if stream:
+            if stream and stream["rows"]:
                 rows = stream["rows"]
                 affected_room_ids = set(row[1] for row in rows)
                 min_stream_id = rows[0][0]
@@ -276,6 +276,7 @@ def start(config_options):
         ps.replicate()
         ps.get_pusherpool().start()
         ps.get_datastore().start_profiling()
+        ps.get_state_handler().start_caching()
 
     reactor.callWhenRunning(start)