Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion handlers/integrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func SlackAuth(w http.ResponseWriter, r *http.Request) {
redirectURI := getSlackRedirectURI(r)
authURL := "https://slack.com/oauth/v2/authorize?" +
"client_id=" + slackClientID +
"&scope=channels:history,channels:read,chat:write,users:read,groups:read,im:history,groups:history" +
"&scope=channels:history,channels:read,chat:write,users:read,groups:read,im:history,groups:history,channels:join" +
"&redirect_uri=" + redirectURI +
"&state=" + state

Expand Down
7 changes: 6 additions & 1 deletion services/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ const (
SlackAPIBaseURL = "https://slack.com/api"
)

// HTTPDoer abstracts the HTTP client for testability.
type HTTPDoer interface {
Do(req *http.Request) (*http.Response, error)
}

// SlackClient handles interactions with the Slack API
type SlackClient struct {
HTTPClient *http.Client
HTTPClient HTTPDoer
BaseURL string
}

Expand Down
Loading
Loading