diff --git a/src/backend/matrix_client.py b/src/backend/matrix_client.py index e470f9b9..a1a1d28f 100644 --- a/src/backend/matrix_client.py +++ b/src/backend/matrix_client.py @@ -740,10 +740,18 @@ class MatrixClient(nio.AsyncClient): async def load_all_room_members(self, room_id: str) -> None: + """Request a room's full member list if it hasn't already been loaded. + + Member lazy-loading is used to accelerate the initial sync with the + server. This method will be called from QML to load a room's entire + member list when the user is currently viewing the room. + """ + room = self.all_rooms[room_id] if not room.members_synced: await super().joined_members(room_id) + await self.register_nio_room(self.all_rooms[room_id]) async def load_past_events(self, room_id: str) -> bool: