From e411da520e1ecd9ff5a320917b65e8e42b17f8f7 Mon Sep 17 00:00:00 2001 From: arcinfini Date: Tue, 9 Jul 2024 21:25:41 -0400 Subject: [PATCH 1/2] use active username rather than username stored in mongo --- app/utils/infraction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/infraction.py b/app/utils/infraction.py index 1436063..43aa715 100644 --- a/app/utils/infraction.py +++ b/app/utils/infraction.py @@ -195,7 +195,7 @@ def __init__(self, user: discord.User | discord.Member, data: Optional[Dict] = N self._user = user self._user_id = data.pop("user_id", user.id) - self._user_name = data.pop("user_name", user.name) + self._user_name = user.display_name # data.pop("user_name", user.name) self._last_updated = data.pop("last_updated", discord.utils.utcnow()) self._banned_patreon = data.pop("banned_patreon", False) self._final_warn = data.pop("final_warn", False) From 4c7174f87d734d50701cd39919d3a5ab04a515ec Mon Sep 17 00:00:00 2001 From: arcinfini Date: Wed, 10 Jul 2024 08:13:40 -0400 Subject: [PATCH 2/2] a single space to satisfy black --- app/utils/infraction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/infraction.py b/app/utils/infraction.py index 43aa715..c29412c 100644 --- a/app/utils/infraction.py +++ b/app/utils/infraction.py @@ -195,7 +195,7 @@ def __init__(self, user: discord.User | discord.Member, data: Optional[Dict] = N self._user = user self._user_id = data.pop("user_id", user.id) - self._user_name = user.display_name # data.pop("user_name", user.name) + self._user_name = user.display_name # data.pop("user_name", user.name) self._last_updated = data.pop("last_updated", discord.utils.utcnow()) self._banned_patreon = data.pop("banned_patreon", False) self._final_warn = data.pop("final_warn", False)