1
0
mirror of https://github.com/ihabunek/toot.git synced 2024-06-23 06:25:26 +00:00

Normalise usernames when searching

This commit is contained in:
Evan Smith 2022-11-05 17:07:32 +00:00 committed by Ivan Habunek
parent 1387d045eb
commit 8b274eeaa1

View File

@ -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")