fix: Add name to preparePreloadData call in sendNotification as a better fix for #5760 (#5769)

Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
II-EMC 2025-04-27 18:30:18 +02:00 committed by GitHub
parent 9bba309b88
commit b3a11a4d9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View file

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

View file

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