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

go conversations: add support for conversations.inviteShared #2

Merged
merged 1 commit into from Aug 7, 2023

Conversation

AChelikani
Copy link

Taken from slack-go#1195.

Pull Request Guidelines

These are recommendations for pull requests.
They are strictly guidelines to help manage expectations.

PR preparation

Run make pr-prep from the root of the repository to run formatting, linting and tests.

Should this be an issue instead
  • is it a convenience method? (no new functionality, streamlines some use case)
  • exposes a previously private type, const, method, etc.
  • is it application specific (caching, retry logic, rate limiting, etc)
  • is it performance related.
API changes

Since API changes have to be maintained they undergo a more detailed review and are more likely to require changes.

  • no tests, if you're adding to the API include at least a single test of the happy case.
  • If you can accomplish your goal without changing the API, then do so.
  • dependency changes. updates are okay. adding/removing need justification.
Examples of API changes that do not meet guidelines:
  • in library cache for users. caches are use case specific.
  • Convenience methods for Sending Messages, update, post, ephemeral, etc. consider opening an issue instead.

values := url.Values{
"channel": {channelID},
}
if params.Emails != nil {

Choose a reason for hiding this comment

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

hmm the API docs are confusing, it says

Optional email to receive this invite. Either emails or user_ids must be provided. Only one email or one user ID may be invited at a time.

but the type of the arguments is array

https://api.slack.com/methods/conversations.inviteShared

Copy link
Author

Choose a reason for hiding this comment

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

Oh true I ran into this lol in our code it only goes one at a time. Gonna leave as is but the call side already loops and calls one by one right now.

Copy link

@ChenJesse ChenJesse left a comment

Choose a reason for hiding this comment

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

looks fine but idk if we can actually pass in multiple emails or user_ids

@AChelikani AChelikani merged commit e35eb96 into master Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants