Skip to content

Commit

Permalink
detect enterprise
Browse files Browse the repository at this point in the history
  • Loading branch information
rusq committed Mar 28, 2024
1 parent 8bf9832 commit 519f4e9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions slackdump.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,13 @@ func New(ctx context.Context, prov auth.Provider, opts ...Option) (*Session, err
if err != nil {
return nil, err
}
// set it as a fallback
sd.client = newFallbackClient(ctx, sd.client, ecl.NewWrapper(cl))

// Enteprise fix
if authResp.EnterpriseID != "" {
sd.client = ecl.NewWrapper(cl)
} else {
sd.client = cl
}

return sd, nil
}
Expand Down

0 comments on commit 519f4e9

Please sign in to comment.