Fixes #831 - Link from Slack notification does not work for teams with subdomains
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// @flow
|
||||
import { Document } from '../models';
|
||||
import { Document, Team } from '../models';
|
||||
|
||||
function present(document: Document, context?: string) {
|
||||
function present(document: Document, team: Team, context?: string) {
|
||||
// the context contains <b> tags around search terms, we convert them here
|
||||
// to the markdown format that slack expects to receive.
|
||||
const text = context
|
||||
@@ -11,7 +11,7 @@ function present(document: Document, context?: string) {
|
||||
return {
|
||||
color: document.collection.color,
|
||||
title: document.title,
|
||||
title_link: `${process.env.URL}${document.url}`,
|
||||
title_link: `${team.url}${document.url}`,
|
||||
footer: document.collection.name,
|
||||
text,
|
||||
ts: document.getTimestamp(),
|
||||
|
||||
Reference in New Issue
Block a user