|
|
|
@ -387,19 +387,21 @@ class InitialSyncHandler(BaseHandler): |
|
|
|
|
receipts = [] |
|
|
|
|
defer.returnValue(receipts) |
|
|
|
|
|
|
|
|
|
presence, receipts, (messages, token) = yield defer.gatherResults( |
|
|
|
|
[ |
|
|
|
|
run_in_background(get_presence), |
|
|
|
|
run_in_background(get_receipts), |
|
|
|
|
run_in_background( |
|
|
|
|
self.store.get_recent_events_for_room, |
|
|
|
|
room_id, |
|
|
|
|
limit=limit, |
|
|
|
|
end_token=now_token.room_key, |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
consumeErrors=True, |
|
|
|
|
).addErrback(unwrapFirstError) |
|
|
|
|
presence, receipts, (messages, token) = yield make_deferred_yieldable( |
|
|
|
|
defer.gatherResults( |
|
|
|
|
[ |
|
|
|
|
run_in_background(get_presence), |
|
|
|
|
run_in_background(get_receipts), |
|
|
|
|
run_in_background( |
|
|
|
|
self.store.get_recent_events_for_room, |
|
|
|
|
room_id, |
|
|
|
|
limit=limit, |
|
|
|
|
end_token=now_token.room_key, |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
consumeErrors=True, |
|
|
|
|
).addErrback(unwrapFirstError), |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
messages = yield filter_events_for_client( |
|
|
|
|
self.store, user_id, messages, is_peeking=is_peeking, |
|
|
|
|