mirror of
https://github.com/ihabunek/toot.git
synced 2024-09-29 04:35:54 -04:00
Normalise usernames when searching
This commit is contained in:
parent
1387d045eb
commit
8b274eeaa1
@ -251,7 +251,8 @@ def _find_account(app, user, account_name):
|
|||||||
account_name = account_name[1:]
|
account_name = account_name[1:]
|
||||||
|
|
||||||
for account in accounts:
|
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
|
return account
|
||||||
|
|
||||||
raise ConsoleError("Account not found")
|
raise ConsoleError("Account not found")
|
||||||
|
Loading…
Reference in New Issue
Block a user