@@ -875,9 +875,7 @@ async def get_joined_user_ids_from_state(
875
875
with Measure (self ._clock , "get_joined_user_ids_from_state" ):
876
876
users_in_room = set ()
877
877
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
881
879
]
882
880
883
881
# 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(
900
898
missing_member_event_ids .append (event_id )
901
899
902
900
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
+ )
905
905
)
906
906
users_in_room .update (
907
907
user_id for user_id in event_to_memberships .values () if user_id
@@ -1106,7 +1106,9 @@ async def _get_joined_hosts(
1106
1106
else :
1107
1107
# The cache doesn't match the state group or prev state group,
1108
1108
# 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
+ )
1110
1112
1111
1113
cache .hosts_to_joined_users = {}
1112
1114
for user_id in joined_user_ids :
0 commit comments