Skip to content

Commit

Permalink
🐛 use team id for user fetching (#3839)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock authored Apr 24, 2024
1 parent 7e31968 commit 7233754
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion providers/slack/resources/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ func (s *mqlSlackUsers) list() ([]interface{}, error) {

ctx := context.Background()

// get team id
teamInfo, err := client.GetTeamInfo()
if err != nil {
return nil, err
}

// requires users:read scope
users, err := client.GetUsersContext(ctx, slack.GetUsersOptionLimit(999))
users, err := client.GetUsersContext(ctx, slack.GetUsersOptionTeamID(teamInfo.ID), slack.GetUsersOptionLimit(999))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 7233754

Please sign in to comment.