Skip to content

Commit

Permalink
Update with latest message format tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
adunkman committed Sep 10, 2021
1 parent ef98970 commit 0b5131e
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions bot/actions/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,18 @@ export async function handleMessage(event: SlackEventMiddlewareArgs<'message'> &
unfurl_links: false,
unfurl_media: false,
attachments: [
{
color: "#ffbe2e",
blocks: pretexts.map((text, i) => ({
type: "section",
text: { type: "mrkdwn", text },
})),
fallback: text,
},
{
color: "#2eb886",
blocks: [
{
...pretexts.map((text, i) => ({
type: "section",
text: { type: "mrkdwn", text: config.message },
text: { type: "mrkdwn", text },
})),
{
type: "context",
elements: [
{ type: "mrkdwn", text: config.message }
],
accessory: {
type: "overflow",
options: config.links.map((link) => ({
Expand All @@ -88,9 +86,9 @@ export async function handleMessage(event: SlackEventMiddlewareArgs<'message'> &
style: "primary"
}
]
}
},
],
fallback: config.message,
fallback: text,
},
],
}));
Expand Down

0 comments on commit 0b5131e

Please sign in to comment.