|
|
@@ -32,12 +32,12 @@ module.exports = (crowi) => {
|
|
|
return next();
|
|
|
}
|
|
|
|
|
|
- const slackbotSigningSecret = (req, res, next) => {
|
|
|
+ const slackBotSigningSecret = (req, res, next) => {
|
|
|
req.signingSecret = crowi.configManager.getConfig('crowi', 'slackbot:signingSecret');
|
|
|
return next();
|
|
|
};
|
|
|
|
|
|
- router.post('/', slackbotSigningSecret, verifyingIsSlackRequest, /* verificationRequestUrl, /* verificationAccessToken, */ async(req, res) => {
|
|
|
+ router.post('/', slackBotSigningSecret, verifyingIsSlackRequest, verificationRequestUrl, verificationAccessToken, async(req, res) => {
|
|
|
|
|
|
|
|
|
// Send response immediately to avoid opelation_timeout error
|
|
|
@@ -100,9 +100,7 @@ module.exports = (crowi) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- router.post('/interactive', verificationRequestUrl, async(req, res) => {
|
|
|
-
|
|
|
- // verifyingIsSlackRequest(req, res, crowi.configManager.getConfig('crowi', 'slackbot:signingSecret'));
|
|
|
+ router.post('/interactive', slackBotSigningSecret, verifyingIsSlackRequest, verificationRequestUrl, verificationAccessToken, async(req, res) => {
|
|
|
|
|
|
// Send response immediately to avoid opelation_timeout error
|
|
|
// See https://api.slack.com/apis/connections/events-api#the-events-api__responding-to-events
|