From af6e1c648e6a1c60effcda7c925379e9b8c7f1ba Mon Sep 17 00:00:00 2001 From: Hanming Zhu Date: Wed, 5 May 2021 16:27:15 +0800 Subject: [PATCH] fix: lower the user names when sorting --- src/chat_handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chat_handlers.py b/src/chat_handlers.py index fd05b45..0323605 100644 --- a/src/chat_handlers.py +++ b/src/chat_handlers.py @@ -11,7 +11,7 @@ def generate_user_list(chat: dict, users: list[dict]) -> str: return "There are no members in this chat!\nPlease add yourself with the /add_me command." message = "Members in {}:\n".format(chat["title"]) - users.sort(key=lambda x: str(x["full_name"])) + users.sort(key=lambda x: str(x["full_name"]).lower()) for user in users: message += "{}\n".format(user["full_name"])