forked from MirrorHub/synapse
Only return devices with keys from /federation/v1/user/devices/
(#8198)
There's not much point in returning all the others, and some people have a silly number of devices.
This commit is contained in:
parent
aec7085179
commit
22b926c284
2 changed files with 2 additions and 3 deletions
1
changelog.d/8198.feature
Normal file
1
changelog.d/8198.feature
Normal file
|
@ -0,0 +1 @@
|
|||
Optimise `/federation/v1/user/devices/` API by only returning devices with encryption keys.
|
|
@ -498,9 +498,7 @@ class DeviceWorkerStore(SQLBaseStore):
|
|||
) -> Tuple[int, List[JsonDict]]:
|
||||
now_stream_id = self._device_list_id_gen.get_current_token()
|
||||
|
||||
devices = self._get_e2e_device_keys_txn(
|
||||
txn, [(user_id, None)], include_all_devices=True
|
||||
)
|
||||
devices = self._get_e2e_device_keys_txn(txn, [(user_id, None)])
|
||||
|
||||
if devices:
|
||||
user_devices = devices[user_id]
|
||||
|
|
Loading…
Reference in a new issue