This one might be a bit complicated, we need to do several things in order for this to work:
[x] Create a "Slack App". This can actually be done without having Slack check it over, we just need to write a few details about it and add some redirect_uri endpoints. We already have a "Riot Bridge" app, which already redirects to the bridge.
[x] Require the user install the app through the https://api.slack.com/docs/slack-button and have a page to catch the redirect_uri so we can grab the token and know which team provided it. This is already done to get us more information about the room, but it's doesn't present the button until you've added a webhook which must go.
[x] Create a user interface which does the following:
Requires you to log in with your slack account.
Provide a list of workspaces the app is installed to, and it's channels (TODO: How do we verify if the user is allowed to bridge Slack into Matrix from the slack pov?) (Also TODO: Which service should be doing this lookup?)
Allow you to bridge one (or more? That sounds like a bad idea) channels to the room.
Allows you to remove the integration
[x] Create an endpoint for the bridge to receive the redirect_uri data from the slack button.
This one might be a bit complicated, we need to do several things in order for this to work:
[x]
Create a "Slack App". This can actually be done without having Slack check it over, we just need to write a few details about it and add someWe already have a "Riot Bridge" app, which already redirects to the bridge.redirect_uri
endpoints.[x]
Require the user install the app through the https://api.slack.com/docs/slack-button and have a page to catch theThis is already done to get us more information about the room, but it's doesn't present the button until you've added a webhook which must go.redirect_uri
so we can grab the token and know which team provided it.[x] Create a user interface which does the following:
[x] Create an endpoint for the bridge to receive the
redirect_uri
data from the slack button.