Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ListTeams and TeamAccess{Granted,Revoked}Events and fix missing enterprise ID #1119

Merged
merged 4 commits into from
Dec 16, 2022

Conversation

stephenwan-opal
Copy link
Contributor

@stephenwan-opal stephenwan-opal commented Oct 26, 2022

This PR makes a few changes useful for building Slack Enterprise Grid integrations.

  • Adds support for team_access_granted and team_access_revoked events
  • Adds ListTeams to call auth.teams.list
  • Fixes an issue where EnterpriseID is not filled in the events api for callback events
  • Lets callers pass TeamID to CreateConversation. This is a breaking change, but hopefully one that prevents future breaking changes.

@stephenwan-opal stephenwan-opal changed the title Add ListTeams and TeamAccess{Granted,Revoked}Events Add ListTeams and TeamAccess{Granted,Revoked}Events and fix missing enterprise ID Oct 26, 2022
Copy link
Member

@kanata2 kanata2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting PR!

conversation.go Outdated
Comment on lines 356 to 357
"is_private": {strconv.FormatBool(params.IsPrivate)},
"team_id": {params.TeamID},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand the behavior when passing an empty parameter... it is better to skip if these fields are empty.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, thanks!

auth.go Show resolved Hide resolved
auth.go Outdated Show resolved Hide resolved
@kanata2 kanata2 added feedback given When a review has been conducted and awaiting the response from the comitter(s) enhancement breaking changes labels Oct 31, 2022
@stephenwan-opal
Copy link
Contributor Author

@kanata2 thank you for reviewing - i addressed/responded to the PR comments

@stephenwan-opal
Copy link
Contributor Author

@kanata2 thanks again for reviewing - could you take a look at the new changes here?

@kanata2
Copy link
Member

kanata2 commented Dec 2, 2022

Sorry for delay. I'll confirm within a few days.

@kanata2 kanata2 self-requested a review December 2, 2022 18:21
@kanata2 kanata2 added needs review and removed feedback given When a review has been conducted and awaiting the response from the comitter(s) labels Dec 2, 2022
Before this change, innerEvent.EnterpriseID was always empty string. Now,
it is filled when available from the outer event.
This is a breaking change that hopefully future proofs this codepath
from future breaking changes, since adding additional params to the
struct should be backwards compatible.
Copy link
Member

@kanata2 kanata2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
I'll release this in next minor version.

@kanata2 kanata2 added this to the v0.12.0 milestone Dec 8, 2022
@kanata2 kanata2 merged commit c0676fc into slack-go:master Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants