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 GetOtherTeam method #1118

Merged
merged 1 commit into from
Dec 8, 2022
Merged

add GetOtherTeam method #1118

merged 1 commit into from
Dec 8, 2022

Conversation

johanmcos
Copy link
Contributor

I'm creating a chatbot that needs to be able to get information about users' teams to decide if/how to respond to them.

As has been noted in #980, the GetTeamInfo method doesn't expose the optional team argument that the Slack API accepts, meaning my bot can only get info about its own team.

#981 attempted to fix this, but lacked backwards compatibility. This is an attempt to implement the functionality in a backwards-compatible way by creating a new GetOtherTeamInfo method, as had been suggested by @kanata2 in the discussion of #981

I'm frankly a little unsure how to implement a meaningful test for this unfortunately, but I can confirm that make pr-prep reported no issues.

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.

@johanmcos

Thanks!
Could you add GetOtherTeamInfoContext method that you can pass context.Context as an argument? 🙏

@kanata2 kanata2 linked an issue Oct 31, 2022 that may be closed by this pull request
@kanata2 kanata2 added the feedback given When a review has been conducted and awaiting the response from the comitter(s) label Oct 31, 2022
@kanata2 kanata2 merged commit 501365f into slack-go:master Dec 8, 2022
@kanata2 kanata2 removed the feedback given When a review has been conducted and awaiting the response from the comitter(s) label Dec 8, 2022
@kanata2
Copy link
Member

kanata2 commented Dec 8, 2022

GetOtherTeamInfoContext

This is put on hold as a future work.

@johanmcos
Copy link
Contributor Author

@johanmcos

Thanks! Could you add GetOtherTeamInfoContext method that you can pass context.Context as an argument? 🙏

Sorry for the delay, I added the requested method in #1143

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.

Extend GetTeamInfo API to accept team argument
2 participants