From bfa7d46a107d4a3eb55701c42fe75290688f4e30 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 4 Mar 2019 18:09:06 +0000 Subject: Allow /keys/{changes,query} API to run on worker --- synapse/handlers/device.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'synapse/handlers') diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index 7e48661355..c09a7c6280 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -101,7 +101,7 @@ class DeviceWorkerHandler(BaseHandler): user_id (str) from_token (StreamToken) """ - now_token = yield self.hs.get_event_sources().get_current_token() + now_room_key = yield self.store.get_room_events_max_id() room_ids = yield self.store.get_rooms_for_user(user_id) @@ -114,7 +114,7 @@ class DeviceWorkerHandler(BaseHandler): rooms_changed = self.store.get_rooms_that_changed(room_ids, from_token.room_key) member_events = yield self.store.get_membership_changes_for_user( - user_id, from_token.room_key, now_token.room_key, + user_id, from_token.room_key, now_room_key, ) rooms_changed.update(event.room_id for event in member_events) -- cgit 1.4.1