This PR replaces the slackbots dependency by @slack/client, which is maintained by Slack directly.
Like slackbots, it keeps an internal data store that caches the team data (like channels and users) but it seems to be handling user/channel CRUD events in order keep the store updated.
I did some experiments with network failures, like turning off the Wi-Fi for short and long periods of time, and it reconnected without any problem. There is a DISCONNECT event indicating a "permanent" client disconnection; I opted to log that event, but I would like to see if the problem we've been experience still occurs before handling the event the hard way (i.e. initializing the client and reconnect again).
The service is now logging a strange message on startup - this one. I didn't found any event I could listen to avoid this, but it seems a pretty harmless message that is kinda expected, judging by the comments on the source code.
This PR replaces the
slackbots
dependency by@slack/client
, which is maintained by Slack directly.Like slackbots, it keeps an internal data store that caches the team data (like channels and users) but it seems to be handling user/channel CRUD events in order keep the store updated.
I did some experiments with network failures, like turning off the Wi-Fi for short and long periods of time, and it reconnected without any problem. There is a
DISCONNECT
event indicating a "permanent" client disconnection; I opted to log that event, but I would like to see if the problem we've been experience still occurs before handling the event the hard way (i.e. initializing the client and reconnect again).The service is now logging a strange message on startup - this one. I didn't found any event I could listen to avoid this, but it seems a pretty harmless message that is kinda expected, judging by the comments on the source code.