Botkit: Breaking change in v0.5.4 (Slack: bot.startRTM())

Created on 3 May 2017  Â·  5Comments  Â·  Source: howdyai/botkit

The bot.startRTM() method was changed to use rtm.connect instead of rtm.start. However, you can see from those two links the payloads returned differ significantly, notably rtm.connect does not contain any user/channel information. The docs still maintain the rtm.start behavior (link) as well.

This broke one of my bots, which used the user/channel data to populate the storage. As it looks like this change was made to correct an unrelated websocket bug, I'm not sure what the best solution is. Perhaps just updating the docs and making clearer note of this change.

Slack-related bug

All 5 comments

The other fields available in rtm.start are "officially" unsupported by slack, a slack rep mentioned that many moons ago in the slack-api channel of the dev4slack.slack.com group.

However, there was no indication of this, as far as I can tell, within the documentation here.

To clarify: @gswalden Did you find a workaround for this? How can it be achieved to connect all teams per connection on RTMstart or something equivalent (IMHO it seems that the shift away from RTM (websocket) to event-based HTTP-POST/GET methods has some disadvantages?)
@jonchurch can we neglect RTM completely in the future for bot connection? What about "controller.startTicking()"?

Currently the Events Api cannot turn off typing indicators. Events api can send indicators, but it is not turned off properly when a message is sent to slack via events api. Slack is aware of this, and the community has been trying to prod them till they fix this.

Thats the last piece that Events API is missing, in terms of feature parity RTM for with typical bot functions.

I am unaware of the usecase that @gswalden is implementing here, but honestly I am far more familar with the FB api than the slack one at this point.

@gawalden, can you elaborate on your usecase here? Can you change to getting that info from an api call to slack to get team info? How badly did this affect you?

The solution was very simple for our use case (our bot is built for a specific team and is not a public app). Prior to calling bot.startRTM(), I called bot.api.users.list() then saved the results via controller.storage.users.save(). So two extra lines of code, nothing serious.

I had spent 15-20 minutes looking into why the initial bug was occurring, so my goal of this issue was more to raise awareness in case others relied on this callback payload.

Awesome, thank you for helping out the community!
On Sun, May 7, 2017 at 3:41 PM Greg Walden notifications@github.com wrote:

The solution was very simple for our use case (our bot is built for a
specific team and is not a public app). Prior to calling bot.startRTM(),
I called bot.api.users.list() then saved the results via
controller.storage.users.save(). So two extra lines of code, nothing
serious.

I had spent 15-20 minutes looking into why the initial bug was occurring,
so my goal of this issue was more to raise awareness in case others relied
on this callback payload.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/howdyai/botkit/issues/829#issuecomment-299729406, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AMUR23dCc9iorNk7CLxV36eB0letfX5yks5r3h6GgaJpZM4NP2_R
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HannanShaik picture HannanShaik  Â·  3Comments

dfischer picture dfischer  Â·  4Comments

stelio picture stelio  Â·  4Comments

JonnyBoy333 picture JonnyBoy333  Â·  3Comments

abinashmohanty picture abinashmohanty  Â·  4Comments