Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 4e62c46

Browse files
committed
Fix formatting
1 parent 6404481 commit 4e62c46

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

synapse/storage/databases/main/roommember.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -875,9 +875,7 @@ async def get_joined_user_ids_from_state(
875875
with Measure(self._clock, "get_joined_user_ids_from_state"):
876876
users_in_room = set()
877877
member_event_ids = [
878-
e_id
879-
for key, e_id in current_state_ids.items()
880-
if key[0] == EventTypes.Member
878+
e_id for key, e_id in state.items() if key[0] == EventTypes.Member
881879
]
882880

883881
# We check if we have any of the member event ids in the event cache
@@ -900,8 +898,10 @@ async def get_joined_user_ids_from_state(
900898
missing_member_event_ids.append(event_id)
901899

902900
if missing_member_event_ids:
903-
event_to_memberships = await self._get_user_ids_from_membership_event_ids(
904-
missing_member_event_ids
901+
event_to_memberships = (
902+
await self._get_user_ids_from_membership_event_ids(
903+
missing_member_event_ids
904+
)
905905
)
906906
users_in_room.update(
907907
user_id for user_id in event_to_memberships.values() if user_id
@@ -1106,7 +1106,9 @@ async def _get_joined_hosts(
11061106
else:
11071107
# The cache doesn't match the state group or prev state group,
11081108
# so we calculate the result from first principles.
1109-
joined_user_ids = await self.get_joined_user_ids_from_state(room_id, state)
1109+
joined_user_ids = await self.get_joined_user_ids_from_state(
1110+
room_id, state
1111+
)
11101112

11111113
cache.hosts_to_joined_users = {}
11121114
for user_id in joined_user_ids:

0 commit comments

Comments
 (0)