fix: Match search requests from Slack using Integration for non-Slack teams (#1599)

* Match slack hook requests to integration
This commit is contained in:
Tom Moor
2020-10-21 08:53:38 -07:00
committed by GitHub
parent 15337b5bdf
commit b78e2f1e05
4 changed files with 120 additions and 13 deletions

View File

@@ -151,7 +151,7 @@ router.get("slack.commands", auth({ required: false }), async (ctx) => {
}
// this code block accounts for the root domain being unable to
// access authentcation for subdomains. We must forward to the appropriate
// access authentication for subdomains. We must forward to the appropriate
// subdomain to complete the oauth flow
if (!user) {
if (state) {
@@ -187,6 +187,9 @@ router.get("slack.commands", auth({ required: false }), async (ctx) => {
userId: user.id,
teamId: user.teamId,
authenticationId: authentication.id,
settings: {
serviceTeamId: data.team_id,
},
});
ctx.redirect("/settings/integrations/slack");