Skip to content

Commit

Permalink
add note + remove a pass
Browse files Browse the repository at this point in the history
  • Loading branch information
squi-ddy committed Jan 24, 2024
1 parent 4aa1bec commit 47f1da3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions bot/src/bot/cogs/github_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ async def do_verification(self, appventure_member: Member, github_username: str,
def prune_auth_flows(self, github_auth_flows: MutableMapping[str, Tuple[int, int]]) -> None:
current_time = time.time()
current_auth_flows = github_auth_flows
# wrap in list to create a copy of items (we modify the dict in the loop)
for key, auth_flow_data in list(current_auth_flows.items()):
if current_time - auth_flow_data[0] >= 86400:
del github_auth_flows[key]
Expand Down
4 changes: 2 additions & 2 deletions bot/src/bot/cogs/ms_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,7 @@ async def verify(self, interaction: Interaction) -> None:
database.get_member_by_discord_id(member.id)
or len({self.cache.alumni_role, self.cache.guest_role}.intersection(member.roles)) > 0
):
# return await send_error(interaction, "You are already verified!", ephemeral=True)
pass
return await send_error(interaction, "You are already verified!", ephemeral=True)

message = self.get_verify_message(interaction.user.id)

Expand Down Expand Up @@ -321,6 +320,7 @@ async def manual_verify(
def prune_auth_flows(self, auth_flows: MutableMapping[str, Tuple[int, int, Any]]) -> None:
current_time = time.time()
current_auth_flows: MutableMapping[str, Tuple[int, int, Any]] = auth_flows
# wrap in list to create a copy of items (we modify the dict in the loop)
for key, auth_flow_data in list(current_auth_flows.items()):
if current_time - auth_flow_data[0] >= 86400:
del auth_flows[key]
Expand Down

0 comments on commit 47f1da3

Please sign in to comment.