Skip to content

Commit

Permalink
Merge pull request #7 from akio0911/real_name
Browse files Browse the repository at this point in the history
display_nameを使う
  • Loading branch information
masuidrive authored Mar 26, 2023
2 parents f54c901 + 94d2195 commit c45c7c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c45c7c3

Please sign in to comment.