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

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizzadar committed Aug 25, 2022
1 parent 6404481 commit 4e62c46
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions synapse/storage/databases/main/roommember.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,9 +875,7 @@ async def get_joined_user_ids_from_state(
with Measure(self._clock, "get_joined_user_ids_from_state"):
users_in_room = set()
member_event_ids = [
e_id
for key, e_id in current_state_ids.items()
if key[0] == EventTypes.Member
e_id for key, e_id in state.items() if key[0] == EventTypes.Member
]

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

if missing_member_event_ids:
event_to_memberships = await self._get_user_ids_from_membership_event_ids(
missing_member_event_ids
event_to_memberships = (
await self._get_user_ids_from_membership_event_ids(
missing_member_event_ids
)
)
users_in_room.update(
user_id for user_id in event_to_memberships.values() if user_id
Expand Down Expand Up @@ -1106,7 +1106,9 @@ async def _get_joined_hosts(
else:
# The cache doesn't match the state group or prev state group,
# so we calculate the result from first principles.
joined_user_ids = await self.get_joined_user_ids_from_state(room_id, state)
joined_user_ids = await self.get_joined_user_ids_from_state(
room_id, state
)

cache.hosts_to_joined_users = {}
for user_id in joined_user_ids:
Expand Down

0 comments on commit 4e62c46

Please sign in to comment.