slack-go / slack

Slack API in Go, originally by @nlopes; Maintainers needed, contact @parsley42
https://pkg.go.dev/github.com/slack-go/slack
BSD 2-Clause "Simplified" License
4.6k stars 1.11k forks source link

InteractionCallback's User object is missing `username` #1218

Open irgraham534 opened 12 months ago

irgraham534 commented 12 months ago

https://github.com/slack-go/slack/blob/c4095cb17cf21c2b2b9c459d5512d14ca5143f64/interactions.go#L35-L71 https://github.com/slack-go/slack/blob/c4095cb17cf21c2b2b9c459d5512d14ca5143f64/users.go#L112-L139

Description

According to Slack's documentation for shortcuts and block_actions, the user object contained within the payload shown in the example should have username.

Regarding the shortcuts, specifically referring to the global shortcut example:

{
  "type": "shortcut",
  "token": "XXXXXXXXXXXXX",
  "action_ts": "1581106241.371594",
  "team": {
    "id": "TXXXXXXXX",
    "domain": "shortcuts-test"
  },
  "user": {
    "id": "UXXXXXXXXX",
    "username": "aman",
    "team_id": "TXXXXXXXX"
  },
  "callback_id": "shortcut_create_task",
  "trigger_id": "944799105734.773906753841.38b5894552bdd4a780554ee59d1f3638"
}