-
Notifications
You must be signed in to change notification settings - Fork 30
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
Access slack data #16
Comments
@cehoffman can you please provide an example (code) of how you would want to use this? |
How I would want to do this might be something like this from a pure mechanics. It could be wrapped up in nicer helpers inside the hear and respond blocks or maybe the adapter is easier to reach from within the responder than having to query the robot. user =
:global.whereis_name("myrobot")
|> GenServer.call({:adapater, Hedwig.Adapter.Slack})
|> GenServer.call({:lookup_user, "US231234AS"})
# user now holds the details of the above user id as kept in the users map Similar genserver calls for |
@scrogson Is this information currently stored anywhere? I could see a definite need for this. |
Nevermind, I found it by poking around |
Since the adapter is a genserver, it would be handy if it could respond to queries for information about users, channels, etc. that is being stored in the state object.
The text was updated successfully, but these errors were encountered: