diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-02-10 09:22:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-10 14:22:16 +0000 |
commit | cf5233b783273efc84b991e7242fb4761ccc201a (patch) | |
tree | a7f940361308ce730a6d9064803fbb5bee890bd1 /synapse/rest | |
parent | Merge branch 'release-v1.77' into develop (diff) | |
download | synapse-cf5233b783273efc84b991e7242fb4761ccc201a.tar.xz |
Avoid fetching unused account data in sync. (#14973)
The per-room account data is no longer unconditionally fetched, even if all rooms will be filtered out. Global account data will not be fetched if it will all be filtered out.
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/admin/users.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/rest/admin/users.py b/synapse/rest/admin/users.py index b9dca8ef3a..0c0bf540b9 100644 --- a/synapse/rest/admin/users.py +++ b/synapse/rest/admin/users.py @@ -1192,7 +1192,8 @@ class AccountDataRestServlet(RestServlet): if not await self._store.get_user_by_id(user_id): raise NotFoundError("User not found") - global_data, by_room_data = await self._store.get_account_data_for_user(user_id) + global_data = await self._store.get_global_account_data_for_user(user_id) + by_room_data = await self._store.get_room_account_data_for_user(user_id) return HTTPStatus.OK, { "account_data": { "global": global_data, |