Skip to content

Commit

Permalink
Update user agent, Slack stopped giving tokens to older Chrome versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
haimgel committed Oct 11, 2023
1 parent dd9a9db commit f042daa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/slack/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

// Slack _needs_ user agent pretending to be Chrome, otherwise it does not give back a token
const fakeUserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"
const fakeUserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"

func GetDCookie() (*http.Cookie, error) {
cookies := kooky.ReadCookies(kooky.Valid, kooky.DomainHasSuffix(`slack.com`), kooky.Name("d"))
Expand Down

0 comments on commit f042daa

Please sign in to comment.