Slack Events API support
pieps opened this issue · comments
Description
Slack has deprecated Outgoing Webhooks, and removed the option from App integrations in favor of their Events API. New users of hangoutsbot's Slack plugin would benefit from Events API support.
Output of /bot version
Bot Version: 3.0.1
Python Version: 3.8.1
- aiohttp 3.6.2
- appdirs 1.4.3
- emoji 0.5.4
- hangups 0.4.10
- telepot 12.7
Expected behaviour
Outgoing Webhooks configurable via Slack settings.
Actual behaviour
Events API must be used now.
Steps to reproduce:
- Visit https://api.slack.com/outgoing-webhooks
- Note mention of deprecation of Outgoing Webhooks in favor of Events API
Note that Slack does have an Outgoing WebHooks app: https://letsgofun.slack.com/apps/A0F7VRG6Q-outgoing-webhooks
Implementation of the Events API would allow for hangoutsbot to work with private channels, DMs, etc., however.
Please excuse the rapid updates on this - I just found the slackrtm plugin, which seems to be newer than the old slack plugin.
Given that the old plugin doesn't seem to work, should it be deprecated in favor of the new(er) one?
The SlackRTM plugin is definitely the better pick.
But it is fairly outdated too and still using custom threads - which do not play nice with the asyncio event loop and can easily crash the bot.
_chatbridge.chatbridge_slackrtm
is what you're looking for -- see SlackRTM plugin on the wiki. This is a rewrite of slackrtm
which drops the threading shenanigans amongst other improvements.
The original slack
plugin is very old now and best avoided.
Thanks for the pointer! I gave it a try and it works splendidly. One further wrinkle though: RTM support is going away along with legacy Slack bots later this month.
I'd love to take a crack at implementing a Slack Events plugin, but as mentioned in #964 I'm unable to contribute unless this project has a license (and a non-AGPL one at that). Any chance of reviving a GPL license?