mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-11 23:40:07 -04:00
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.
This commit is contained in:
parent
d793fcd241
commit
cf5233b783
8 changed files with 176 additions and 90 deletions
|
@ -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, {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue