Fix: Add name to preparePreloadData call in sendNotification

This commit is contained in:
EMC 2025-04-12 14:02:06 +02:00
parent 13a85b8200
commit 15396e2b7d
2 changed files with 2 additions and 3 deletions

View File

@ -1327,7 +1327,8 @@ class Monitor extends BeanModel {
try {
const heartbeatJSON = bean.toJSON();
const monitorData = [{ id: monitor.id,
active: monitor.active
active: monitor.active,
name: monitor.name
}];
const preloadData = await Monitor.preparePreloadData(monitorData);
// Prevent if the msg is undefined, notifications such as Discord cannot send out.

View File

@ -79,13 +79,11 @@ class Mattermost extends NotificationProvider {
fallback:
"Your " +
monitorJSON.pathName +
monitorJSON.name +
" service went " +
statusText,
color: color,
title:
monitorJSON.pathName +
monitorJSON.name +
" service went " +
statusText,
title_link: monitorJSON.url,