curl -F token=... -F usergroup=SJ6JQHVBN --url 'https://slack.com/api/usergroups.update' -F description="this is a description" -F handle="zz__test_usergroup" -F name="this is a name" -F channels=C92MKCRPU
{"usergroup":{"id":"SJ6JQHVBN","name":"this is a name","description":"this is a description","handle":"zz__test_usergroup","prefs":{"channels":["C92MKCRPU"],"groups":[]}}, ...}
Clear the default channels
curl -F token=... -F usergroup=SJ6JQHVBN --url 'https://slack.com/api/usergroups.update' -F description="this is a description" -F handle="zz__test_usergroup" -F name="this is a name" -F channels=
{"usergroup":{"id":"SJ6JQHVBN","name":"this is a name","description":"this is a description","handle":"zz__test_usergroup","prefs":{"channels":[],"groups":[]}}, ...}
Clear the description
curl -F token=... -F usergroup=SJ6JQHVBN --url 'https://slack.com/api/usergroups.update' -F description= -F handle="zz__test_usergroup" -F name="this is a name" -F channels=
{"usergroup":{"id":"SJ6JQHVBN","name":"this is a name","description":"","handle":"zz__test_usergroup","prefs":{"channels":[],"groups":[]}}, ...}
PR preparation
✅ Ran make pr-prop on HEAD (38367d1)
Should this be an issue instead
[x] No ~is it a convenience method? (no new functionality, streamlines some use case)~
[x] No ~exposes a previously private type, const, method, etc.~
[x] No ~is it application specific (caching, retry logic, rate limiting, etc)~
[x] No ~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.~
I have added the test cases for updateUserGroup
If you can accomplish your goal without changing the API, then do so.
Please let me know if you prefer a way to deprecate the current methods and create new ones.
~dependency changes. updates are okay. adding/removing need justification.~
Nothing.
Examples of API changes that do not meet guidelines:
Fix: https://github.com/slack-go/slack/issues/1081
Expected
We can clear the description and the default channels of usergroups by sending empty strings.
Actual
updateUserGroup
ignores empty strings so this never sends empty strings to the server.Examples
The followings are examples using
curl
. ref: https://api.slack.com/methods/usergroups.updateSet Up
Clear the default channels
Clear the description
PR preparation
✅ Ran
make pr-prop
on HEAD (38367d1)Should this be an issue instead
API changes
Since API changes have to be maintained they undergo a more detailed review and are more likely to require changes.
Examples of API changes that do not meet guidelines:
N/A