Skip to content
This repository was archived by the owner on Jan 28, 2019. It is now read-only.

Provide the user/team IDs when handling authTest success #11

Merged
merged 2 commits into from
Feb 19, 2018

Conversation

khakionion
Copy link

Slack's API documentation seems to indicate that the best way to figure out "who am I" is to get the user and team ID from the JSON returned by the authentication test command.

This PR changes from using the SuccessClosure to a new AuthTestClosure that provides the user and team IDs to the caller.

@pvzig
Copy link
Owner

pvzig commented Feb 19, 2018

Awesome, thanks for the PR! One small change: can you make the closure take optional strings instead of force unwrapping here? I wouldn't want to be crashing here in the event of an API change by Slack.

@khakionion
Copy link
Author

Done, and tested on my local Slack bot.

@pvzig
Copy link
Owner

pvzig commented Feb 19, 2018

Great, thanks again!

@pvzig pvzig merged commit 6344d39 into pvzig:master Feb 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants