Easy refactors of the user directory (#10789)

No functional changes here. This came out as I was working to tackle #5677
This commit is contained in:
David Robertson 2021-09-10 10:54:38 +01:00 committed by GitHub
parent c6f5fb5477
commit 318162f5de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 90 additions and 37 deletions

View file

@ -196,6 +196,11 @@ class RoomMemberWorkerStore(EventsWorkerStore):
) -> Dict[str, ProfileInfo]:
"""Get a mapping from user ID to profile information for all users in a given room.
The profile information comes directly from this room's `m.room.member`
events, and so may be specific to this room rather than part of a user's
global profile. To avoid privacy leaks, the profile data should only be
revealed to users who are already in this room.
Args:
room_id: The ID of the room to retrieve the users of.