Skip to content

Commit

Permalink
Normalise usernames when searching
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJokersThief authored and ihabunek committed Nov 8, 2022
1 parent 1387d04 commit 8b274ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion toot/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ def _find_account(app, user, account_name):
account_name = account_name[1:]

for account in accounts:
if account['acct'] == account_name:
# Normalise string matching because usernames are case insensitive
if account['acct'].lower() == account_name.lower():
return account

raise ConsoleError("Account not found")
Expand Down

0 comments on commit 8b274ee

Please sign in to comment.