mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-01-05 11:50:52 -05:00
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
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]]:
|
) -> Tuple[int, List[JsonDict]]:
|
||||||
now_stream_id = self._device_list_id_gen.get_current_token()
|
now_stream_id = self._device_list_id_gen.get_current_token()
|
||||||
|
|
||||||
devices = self._get_e2e_device_keys_txn(
|
devices = self._get_e2e_device_keys_txn(txn, [(user_id, None)])
|
||||||
txn, [(user_id, None)], include_all_devices=True
|
|
||||||
)
|
|
||||||
|
|
||||||
if devices:
|
if devices:
|
||||||
user_devices = devices[user_id]
|
user_devices = devices[user_id]
|
||||||
|
Loading…
Reference in New Issue
Block a user