Shuffle receipt handler around so that worker apps don't need to load it

This commit is contained in:
Erik Johnston 2016-11-23 15:14:24 +00:00
parent ee5e8d71ac
commit feec718265
7 changed files with 11 additions and 9 deletions

View file

@ -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(