|
|
@@ -124,9 +124,9 @@ module.exports = function(crowi) {
|
|
|
return message;
|
|
|
};
|
|
|
|
|
|
- const prepareSlackMessageForComment = function(comment, user, channel) {
|
|
|
+ const prepareSlackMessageForComment = function(comment, user, channel, path) {
|
|
|
const url = config.crowi['app:url'] || '';
|
|
|
- const body = prepareAttachmentTextForComment(comment, user);
|
|
|
+ const body = prepareAttachmentTextForComment(comment);
|
|
|
|
|
|
const attachment = {
|
|
|
color: '#263a3c',
|
|
|
@@ -143,7 +143,7 @@ module.exports = function(crowi) {
|
|
|
const message = {
|
|
|
channel: '#' + channel,
|
|
|
username: Config.appTitle(config),
|
|
|
- text: getSlackMessageTextForComment('what do i do with path', user),
|
|
|
+ text: getSlackMessageTextForComment(path, user),
|
|
|
attachments: [attachment],
|
|
|
};
|
|
|
|
|
|
@@ -180,8 +180,8 @@ module.exports = function(crowi) {
|
|
|
return promisifiedSlackPost(messageObj);
|
|
|
};
|
|
|
|
|
|
- slack.postComment = (comment, user, channel) => {
|
|
|
- const messageObj = prepareSlackMessageForComment(comment, user, channel);
|
|
|
+ slack.postComment = (comment, user, channel, path) => {
|
|
|
+ const messageObj = prepareSlackMessageForComment(comment, user, channel, path);
|
|
|
|
|
|
return promisifiedSlackPost(messageObj);
|
|
|
};
|