diff options
author | Erik Johnston <erik@matrix.org> | 2019-03-04 18:09:06 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-03-04 18:30:01 +0000 |
commit | bfa7d46a107d4a3eb55701c42fe75290688f4e30 (patch) | |
tree | c4dff7fc37e9029e48acea43e2841ac3a7f73279 /synapse/handlers/device.py | |
parent | Split DeviceHandler into master and worker (diff) | |
download | synapse-bfa7d46a107d4a3eb55701c42fe75290688f4e30.tar.xz |
Allow /keys/{changes,query} API to run on worker
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r-- | synapse/handlers/device.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |