Support team.profile.get method #1097
Merged
+167
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a duplicate of #474 that was closed due to no activity on my part. Reopening to have it merged as I believe others could benefit from it.
This PR adds support to retrieve custom fields defined on the Team, which can be populated via the
users.profile.set
endpoint. Profile field variables are custom to the team, so being able to retrieve them is important when setting new values. These values can also be found within the profile section of the Admin Console as noted in the comment of the function.This PR also adds support for updating the custom fields on a user using these variables. The new function accepts a map of the existing struct
UserProfileCustomField
. The key of the map is the custom Team Variable to define the custom field on the user.Note that any existing field set, but not passed to function to be updated will be cleared based on Slack's native functionality.
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
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: