FoundersFounders / door-services

IoT project for the doorbell and door-open services here at FoundersFounders.
MIT License
14 stars 6 forks source link

Use the official Slack Node client #10

Closed ruippeixotog closed 8 years ago

ruippeixotog commented 8 years ago

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.

luismfonseca commented 8 years ago

LGTM!