Skip to content

slack-adapter shouldn't pick the username as a fullname #267

@sundaycrafts

Description

@sundaycrafts

Bug Description

Slack adapter takes username as a fullname, but it's not intended to be public or full name as Slack UI says:

Usernames are not part of your profile, and are only required by Slack for technical reasons. Your username is mostly invisible to others, but you can change it if you want to.
Usernames must be all lowercase. They cannot be longer than 21 characters and can only contain letters, numbers, periods, hyphens, and underscores.
see https://<your_workspace>.slack.com/account/settings?updated_username=1#username

user.name is way better as a full name.

userName: payload.user.username || payload.user.name || "unknown",

Steps to Reproduce

  1. Integrate Slack adapter
  2. Send action block as a message
  3. Retrieve "full name" from event.user.fullName

Expected Behavior

  1. Integrate Slack adapter
  2. Send action block as a message
  3. Retrieve "full name" from event.user.fullName
  4. It's something other than "username", such as "name"

Actual Behavior

  1. Integrate Slack adapter
  2. Send action block as a message
  3. Retrieve "full name" from event.user.fullName
  4. It's "username"

Code Sample

Chat SDK Version

4.20.2

Node.js Version

No response

Platform Adapter

Slack

Operating System

macOS

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions