summary refs log tree commit diff
path: root/synapse/handlers/initial_sync.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-11-23 15:14:24 +0000
committerErik Johnston <erik@matrix.org>2016-11-23 15:14:24 +0000
commitfeec71826523deb63ca6b43cdcecc8edf8710775 (patch)
tree22e17d6e0fca9a1ad4055198dcb0488cb3084623 /synapse/handlers/initial_sync.py
parentFix tests (diff)
downloadsynapse-feec71826523deb63ca6b43cdcecc8edf8710775.tar.xz
Shuffle receipt handler around so that worker apps don't need to load it
Diffstat (limited to 'synapse/handlers/initial_sync.py')
-rw-r--r--synapse/handlers/initial_sync.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/handlers/initial_sync.py b/synapse/handlers/initial_sync.py
index fbfa5a0281..e0ade4c164 100644
--- a/synapse/handlers/initial_sync.py
+++ b/synapse/handlers/initial_sync.py
@@ -372,11 +372,12 @@ class InitialSyncHandler(BaseHandler):
 
         @defer.inlineCallbacks
         def get_receipts():
-            receipts_handler = self.hs.get_handlers().receipts_handler
-            receipts = yield receipts_handler.get_receipts_for_room(
+            receipts = yield self.store.get_linearized_receipts_for_room(
                 room_id,
-                now_token.receipt_key
+                to_key=now_token.receipt_key,
             )
+            if not receipts:
+                receipts = []
             defer.returnValue(receipts)
 
         presence, receipts, (messages, token) = yield defer.gatherResults(