Skip to content

Commit

Permalink
fix: type error
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebonsignori committed Aug 1, 2022
1 parent ee4461a commit ff7da8c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/send-to-slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function renderNotificationMessage(inputs: { timezone: string }, notification: E
async function sendToSlack(
core: typeof CoreLibrary,
slack: WebClient,
inputs: { rollupNotifications: boolean; destination: string },
inputs: { rollupNotifications: boolean; destination: string, timezone: string },
notifications: Endpoints["GET /notifications"]["response"]["data"]
) {
// On rollup, send all notifications in one message body
Expand All @@ -42,12 +42,12 @@ async function sendToSlack(
if (textBody) {
textBody += "\n\n";
}
textBody += renderNotificationMessage(notification);
textBody += renderNotificationMessage(inputs, notification);
blocks.push({
type: "section",
text: {
type: "mrkdwn",
text: renderNotificationMessage(notification),
text: renderNotificationMessage(inputs, notification),
},
})
}
Expand All @@ -70,7 +70,7 @@ async function sendToSlack(

// If not rollup, send each notification individually
for (const notification of notifications) {
const text = renderNotificationMessage(notification);
const text = renderNotificationMessage(inputs, notification);
// Not promisified for rate limitting, wait 2 seconds between each message
try {
await slack.chat.postMessage({
Expand Down

0 comments on commit ff7da8c

Please sign in to comment.