Slack hooks fixes and improvements

closes #533
This commit is contained in:
Tom Moor
2018-01-28 19:37:14 -08:00
parent 97268314fe
commit f870cd88bc
3 changed files with 11 additions and 4 deletions

View File

@ -71,13 +71,14 @@ router.post('hooks.slack', async ctx => {
color: document.collection.color,
title: document.title,
title_link: `${process.env.URL}${document.getUrl()}`,
footer: document.collection.name,
text: document.getSummary(),
ts: new Date(document.updatedAt).getTime(),
ts: document.getTimestamp(),
});
}
ctx.body = {
text: `This is what we found…`,
text: `This is what we found for "${text}"`,
attachments,
};
} else {