feat: issue line break and support markdown
* The issue in the notice is implemented with line break. * The notification format adopts markdown.pull/37/head
parent
03d6a5cee9
commit
5ae6443b10
|
|
@ -55,12 +55,12 @@ function formatStatusChangeNotification(
|
||||||
} else if (timeNow == timeIncidentStart) {
|
} else if (timeNow == timeIncidentStart) {
|
||||||
return {
|
return {
|
||||||
title: `🔴 ${monitor.name} is currently down.`,
|
title: `🔴 ${monitor.name} is currently down.`,
|
||||||
body: `Service is unavailable at ${timeNowFormatted}. Issue: ${reason || 'unspecified'}`,
|
body: `Service is unavailable at ${timeNowFormatted}.\n**Issue:** ${reason || 'unspecified'}`,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
title: `🔴 ${monitor.name} is still down.`,
|
title: `🔴 ${monitor.name} is still down.`,
|
||||||
body: `Service is unavailable since ${timeIncidentStartFormatted} (${downtimeDuration} minutes). Issue: ${reason || 'unspecified'}`,
|
body: `Service is unavailable since ${timeIncidentStartFormatted} (${downtimeDuration} minutes).\n**Issue:** ${reason || 'unspecified'}`,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -83,7 +83,7 @@ async function notifyWithApprise(
|
||||||
title,
|
title,
|
||||||
body,
|
body,
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
format: 'text'
|
format: 'markdown'
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue