mirror of
https://github.com/element-hq/synapse.git
synced 2026-06-04 19:01:27 +00:00
Clarify _generate_initial_sync_entry_for_profile_updates is for local users only currently
This commit is contained in:
@@ -2142,10 +2142,7 @@ class SyncHandler:
|
||||
Build an initial sync entry for profile updates and attach it to the
|
||||
given `sync_result_builder`.
|
||||
|
||||
Note: Only the profile information for local users is returned. This is
|
||||
to prevent fetching *too* many profiles in one request. Clients should
|
||||
ideally instead first fetch profiles on-demand, then track updates for
|
||||
all users via incremental `/sync`.
|
||||
Note: Currently, only profile updates of local users are generated.
|
||||
|
||||
Args:
|
||||
user_id: The Matrix ID of the user to generate the sync entry for.
|
||||
|
||||
@@ -431,7 +431,17 @@ class ProfileWorkerStore(SQLBaseStore):
|
||||
async def get_profile_data_for_users(
|
||||
self, user_ids: Collection[str]
|
||||
) -> dict[str, dict[str, str | JsonDict | None]]:
|
||||
"""Fetch displayname/avatar_url/custom fields for a list of users."""
|
||||
"""Fetch displayname/avatar_url/custom fields for a list of users.
|
||||
|
||||
Currently, this returns only local users as the `profiles` table only
|
||||
tracks local users.
|
||||
|
||||
Args:
|
||||
user_ids: List of user IDs to filter against.
|
||||
|
||||
Returns:
|
||||
Dictionary of displayname/avatar_url/custom fields for a list of users.
|
||||
"""
|
||||
if not user_ids:
|
||||
return {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user