-
Notifications
You must be signed in to change notification settings - Fork 182
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
Slack RTM breaking changes #233
Comments
Hi @binaryseed ! How are you doing the initializations of the state? |
@binaryseed if you Slack app is new (within the last 1.5 yrs or so) it won't work. See this page for details: https://api.slack.com/methods/rtm.start |
Here's the changes I made in a branch to make this work.. |
And to initialize def handle_connect(slack, state) do
channels =
Slack.Web.Channels.list(%{token: slack.token})
|> Map.get(:channels)
|> Map.new(&{&1.id, &1})
slack =
slack
|> Map.put(:channels, channels)
{:ok, {slack, state}}
end |
@binaryseed want to create a pull request? Also please make sure you run the tests to ensure there are no regressions from this change |
Here we go: #235 Likely need to do some docs tweaks alongside it... |
Regarding the note in the Readme about the Slack API changes upon connect (
rtm.start
).. https://github.com/BlakeWilliams/Elixir-Slack#upgrading-from-0x-to-020rtm.start
altogether?/api/rtm.connect
to get connected with the Slack API nowSlack
callbackhandle_connect
to let you modify theslack
portion of the internal state, which is necessary for any following state management to functionid
as the key, not just a listThese could be addressed fairly easily, but I'm not sure if there other implications...
The text was updated successfully, but these errors were encountered: