Return relevant context in search results returned to slack slash command

This commit is contained in:
Tom Moor
2018-08-05 00:34:08 -07:00
parent 71830d7c77
commit fc7373a6f5
4 changed files with 19 additions and 7 deletions

View File

@ -71,7 +71,7 @@ router.post('hooks.slack', async ctx => {
if (results.length) {
const attachments = [];
for (const result of results) {
attachments.push(presentSlackAttachment(result.document));
attachments.push(presentSlackAttachment(result.document, result.context));
}
ctx.body = {