diff --git a/mautrix/client/state_store/memory.py b/mautrix/client/state_store/memory.py index 949d2659..de7f0888 100644 --- a/mautrix/client/state_store/memory.py +++ b/mautrix/client/state_store/memory.py @@ -75,7 +75,7 @@ async def set_membership(self, room_id: RoomID, user_id: UserID, async def get_members(self, room_id: RoomID) -> Optional[List[UserID]]: try: - return [user_id for user_id, member in self.members[room_id] + return [user_id for user_id, member in self.members[room_id].items() if (member.membership == Membership.JOIN or member.membership == Membership.INVITE)] except KeyError: