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/handlers/room_member.py | |
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/handlers/room_member.py')
-rw-r--r-- | synapse/handlers/room_member.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py index d236cc09b5..6e7141d2ef 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py @@ -484,7 +484,7 @@ class RoomMemberHandler(metaclass=abc.ABCMeta): user_id: The user's ID. """ # Retrieve user account data for predecessor room - user_account_data, _ = await self.store.get_account_data_for_user(user_id) + user_account_data = await self.store.get_global_account_data_for_user(user_id) # Copy direct message state if applicable direct_rooms = user_account_data.get(AccountDataTypes.DIRECT, {}) |