Fix bug when checking if token is in active clients
All checks were successful
release-image / release-image (push) Successful in 2m5s
All checks were successful
release-image / release-image (push) Successful in 2m5s
This commit is contained in:
@@ -188,10 +188,9 @@ async def delete_discord_token(discord_id_param: str):
|
|||||||
|
|
||||||
def find_token_in_active_clients(target_token: str) -> bool:
|
def find_token_in_active_clients(target_token: str) -> bool:
|
||||||
"""
|
"""
|
||||||
Checks if a target_token exists in the active_token of any ActiveClient object in a list.
|
Checks if a target_token exists in the active_token of any online ActiveClient object.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
clients: A list of ActiveClient objects.
|
|
||||||
target_token: The token string to search for.
|
target_token: The token string to search for.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@@ -199,7 +198,7 @@ def find_token_in_active_clients(target_token: str) -> bool:
|
|||||||
"""
|
"""
|
||||||
for client_id in current_app.active_clients:
|
for client_id in current_app.active_clients:
|
||||||
try:
|
try:
|
||||||
if current_app.active_clients[client_id].active_token == target_token:
|
if current_app.active_clients[client_id].active_token.token == target_token:
|
||||||
return True
|
return True
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user