From 94d219594dac65578895fb083290709d665839be Mon Sep 17 00:00:00 2001 From: akio0911 Date: Sun, 26 Mar 2023 12:17:12 +0900 Subject: [PATCH] =?UTF-8?q?display=5Fname=E3=82=92=E4=BD=BF=E3=81=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/slack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/slack.py b/lib/slack.py index b5c5618..38f0344 100644 --- a/lib/slack.py +++ b/lib/slack.py @@ -144,7 +144,7 @@ def get_user_name(self, user_id: str) -> str: None """ matching_users = [user for user in self.users if user['id'] == user_id] - return matching_users[0]['name'] if len(matching_users) > 0 else None + return matching_users[0]['profile']['display_name'] if len(matching_users) > 0 else None def replace_user_id_with_name(self, body_text: str) -> str: """ Replace user IDs in a chat message text with user names.