Merge pull request #463 from buster-so/dallin/bus-1351-add-a-button-to-the-chat-at-bottom-of-slack-messages

slack-notifier
This commit is contained in:
dal 2025-07-09 15:15:32 -07:00 committed by GitHub
commit b10b368484
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 55 additions and 0 deletions

View File

@ -47,6 +47,16 @@ interface SlackBlock {
text: string;
verbatim?: boolean;
};
elements?: Array<{
type: string;
text?: {
type: string;
text: string;
emoji?: boolean;
};
url?: string;
action_id?: string;
}>;
}
interface SlackMessage {
@ -402,6 +412,21 @@ function formatSlackMessage(params: SlackNotificationParams): SlackMessage {
verbatim: false,
},
},
{
type: 'actions',
elements: [
{
type: 'button',
text: {
type: 'plain_text',
text: 'Open in Buster',
emoji: false,
},
url: chatUrl,
action_id: 'actionId-0',
},
],
},
],
};
}
@ -425,6 +450,21 @@ function formatSlackMessage(params: SlackNotificationParams): SlackMessage {
verbatim: false,
},
},
{
type: 'actions',
elements: [
{
type: 'button',
text: {
type: 'plain_text',
text: 'Open in Buster',
emoji: false,
},
url: chatUrl,
action_id: 'actionId-0',
},
],
},
],
};
}
@ -448,6 +488,21 @@ function formatSlackMessage(params: SlackNotificationParams): SlackMessage {
verbatim: false,
},
},
{
type: 'actions',
elements: [
{
type: 'button',
text: {
type: 'plain_text',
text: 'Open in Buster',
emoji: false,
},
url: chatUrl,
action_id: 'actionId-0',
},
],
},
],
};
}