slack-go / slack

Slack API in Go, originally by @nlopes; Maintainers needed, contact @parsley42
https://pkg.go.dev/github.com/slack-go/slack
BSD 2-Clause "Simplified" License
4.63k stars 1.12k forks source link

Make UpdateUserGroupMembers arguments to be more consistent #1173

Open painhardcore opened 1 year ago

painhardcore commented 1 year ago

Change is pretty simple and needed to make flow more straightforward Get members from group --> Update group with members Get slice --> send slice closes #1172

johanmcos commented 1 year ago

I'm not a maintainer, but I think if you want any chance of this being accepted, you're going to need to figure out how to make your change backwards-compatible.

Perhaps you could use a variadic function argument for members

karnikg commented 7 months ago

This perhaps is not a needed/relevant change? I looked at forking the repo to make this change, and realized from the documentation that the actual API needs a comma separated string

A comma separated string of encoded user IDs that represent the entire list of users for the user group.

https://api.slack.com/methods/usergroups.users.update Passing a comma separated string instead seemed to work just fine for me (instead of a list)