应用端
是的,有。在 slack 窗口中,在您的用户名左下方,有一个向上箭头。单击它,您将看到一个偏好选项。
进入首选项后,单击消息显示。在此选项中,您将找到“显示真实姓名而不是用户名”。确保选中此项并单击完成。
对于 API 端
由于这是标记为 Slack-api 并且我不确定这是否是您所说的,在来自 users.list 方法的 API 响应中,它将返回名字/姓氏,所以您可以只需要在你正在做的任何事情中使用它。 Reference the Docs for the Slack API
{
"ok": true,
"members": [
{
"id": "U023BECGF",
"name": "bobby",
"deleted": false,
"color": "9f69e7",
"profile": {
"first_name": "Bobby",
"last_name": "Tables",
"real_name": "Bobby Tables",
"email": "bobby@slack.com",
"skype": "my-skype-name",
"phone": "+1 (123) 456 7890",
"image_24": "https:\/\/...",
"image_32": "https:\/\/...",
"image_48": "https:\/\/...",
"image_72": "https:\/\/...",
"image_192": "https:\/\/..."
},
"is_admin": true,
"is_owner": true,
"has_2fa": false,
"has_files": true
},
...
]
}