errbotio / err-backend-slackv3

Slack Events and RTM backend for Errbot
GNU General Public License v3.0
27 stars 28 forks source link

No setting online status #65

Open msg4real opened 2 years ago

msg4real commented 2 years ago

Using socket mode online status is not set by bot...

I am having to set the online status as always online in the slack app creation website

chadleeshaw commented 2 years ago

I think this is intentional:


If your bot user runs on the [Events API](https://api.slack.com/events-api), you can only toggle your bot's active or away status by [managing your app](https://api.slack.com/apps) and its Bot Users panel, or for apps published in the App Directory, on the Live App Settings panel.

Toggling bot user presence for the events API
When set to Off, your bot user is only marked as online if it's connected to the RTM API.

When set to On, your bot user will be marked as active and present. That green dot is all yours. Just toggle back Off again to be marked away.

Your bot user's [profile](https://api.slack.com/methods/users.profile.get) will include a always_active field set to true. Counter-intuitively, your bot's presence field will remain away. That's the bad news.

The good news is that always_active will be interpreted by Slack clients as if the bot user's presence were active. Yes, you're awarded that green dot.```
nzlosh commented 1 year ago

As I understand the slack documentation it would be possible to toggle the always_active field when the bot is cleanly started or stopped to show its availability.

However, the field toggle solution is fragile enough to render it undependable. If the bot crashes or there is a network outage, it won't be toggled to offline, which would lead to confusion. I'd accept patches to implement this if someone felt it was worth while but I'd expect it be something configurable.