diff options
-rw-r--r-- | changelog.d/8198.feature | 1 | ||||
-rw-r--r-- | synapse/storage/databases/main/devices.py | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/changelog.d/8198.feature b/changelog.d/8198.feature new file mode 100644 index 0000000000..c4401288bf --- /dev/null +++ b/changelog.d/8198.feature @@ -0,0 +1 @@ +Optimise `/federation/v1/user/devices/` API by only returning devices with encryption keys. diff --git a/synapse/storage/databases/main/devices.py b/synapse/storage/databases/main/devices.py index ecd3f3b310..def96637a2 100644 --- a/synapse/storage/databases/main/devices.py +++ b/synapse/storage/databases/main/devices.py @@ -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] |