|
|
@@ -77,10 +77,16 @@ module.exports = function(crowi, app) {
|
|
|
});
|
|
|
|
|
|
// slack notification
|
|
|
+ // if (form.slackOn) {
|
|
|
const slackNotify = new slack(crowi);
|
|
|
const user = await User.findUserByUsername(req.user.username);
|
|
|
const path = page.path;
|
|
|
- await slackNotify.postComment(createdComment, user, 'general', path);
|
|
|
+ // const channels = form.channel;
|
|
|
+ const channels = 'general';
|
|
|
+ channels.split(',').map(function(chan) {
|
|
|
+ slackNotify.postComment(createdComment, user, chan, path);
|
|
|
+ });
|
|
|
+ // }
|
|
|
|
|
|
return res.json(ApiResponse.success({comment: createdComment}));
|
|
|
};
|