Skip to content

Commit

Permalink
fix: slack notification sending being broken
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Oct 16, 2024
1 parent 42e7779 commit 5f4ad99
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/notification-providers/slack.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Slack extends NotificationProvider {
* @param {object} monitorJSON The monitor config
* @returns {Array} The relevant action objects
*/
static buildActions(baseURL, monitorJSON) {
buildActions(baseURL, monitorJSON) {
const actions = [];

if (baseURL) {
Expand Down Expand Up @@ -73,7 +73,7 @@ class Slack extends NotificationProvider {
* @param {string} msg The message body
* @returns {Array<object>} The rich content blocks for the Slack message
*/
static buildBlocks(baseURL, monitorJSON, heartbeatJSON, title, msg) {
buildBlocks(baseURL, monitorJSON, heartbeatJSON, title, msg) {

//create an array to dynamically add blocks
const blocks = [];
Expand Down Expand Up @@ -150,7 +150,7 @@ class Slack extends NotificationProvider {
data.attachments.push(
{
"color": (heartbeatJSON["status"] === UP) ? "#2eb886" : "#e01e5a",
"blocks": Slack.buildBlocks(baseURL, monitorJSON, heartbeatJSON, title, msg),
"blocks": this.buildBlocks(baseURL, monitorJSON, heartbeatJSON, title, msg),
}
);
} else {
Expand Down

0 comments on commit 5f4ad99

Please sign in to comment.