Add ability to link Slack <-> Outline accounts (#6682)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { traceFunction } from "@server/logging/tracing";
|
||||
import { Document, Collection, Team } from "@server/models";
|
||||
|
||||
type Action = {
|
||||
@@ -8,7 +7,7 @@ type Action = {
|
||||
value: string;
|
||||
};
|
||||
|
||||
function presentMessageAttachment(
|
||||
export function presentMessageAttachment(
|
||||
document: Document,
|
||||
team: Team,
|
||||
collection?: Collection | null,
|
||||
@@ -32,7 +31,3 @@ function presentMessageAttachment(
|
||||
actions,
|
||||
};
|
||||
}
|
||||
|
||||
export default traceFunction({
|
||||
spanName: "presenters",
|
||||
})(presentMessageAttachment);
|
||||
|
||||
38
plugins/slack/server/presenters/userNotLinkedBlocks.ts
Normal file
38
plugins/slack/server/presenters/userNotLinkedBlocks.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { t } from "i18next";
|
||||
import { Team } from "@server/models";
|
||||
import { opts } from "@server/utils/i18n";
|
||||
import env from "../env";
|
||||
|
||||
export function presentUserNotLinkedBlocks(team?: Team) {
|
||||
const appName = env.APP_NAME;
|
||||
|
||||
return [
|
||||
{
|
||||
type: "section",
|
||||
text: {
|
||||
type: "mrkdwn",
|
||||
text:
|
||||
t(
|
||||
`It looks like you haven’t linked your {{ appName }} account to Slack yet`,
|
||||
{
|
||||
...opts(),
|
||||
appName,
|
||||
}
|
||||
) +
|
||||
". " +
|
||||
(team
|
||||
? `<${team.url}/settings/integrations/slack|${t(
|
||||
"Link your account",
|
||||
opts()
|
||||
)}>`
|
||||
: t(
|
||||
"Link your account in {{ appName }} settings to search from Slack",
|
||||
{
|
||||
...opts(),
|
||||
appName,
|
||||
}
|
||||
)),
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user