mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-21 00:26:47 +08:00
feat: rework notification templating and add support for telegram (#5637)
This commit is contained in:
committed by
GitHub
parent
fce824f5a8
commit
9857770cc7
@@ -22,6 +22,14 @@ class Telegram extends NotificationProvider {
|
||||
params.message_thread_id = notification.telegramMessageThreadID;
|
||||
}
|
||||
|
||||
if (notification.telegramUseTemplate) {
|
||||
params.text = await this.renderTemplate(notification.telegramTemplate, msg, monitorJSON, heartbeatJSON);
|
||||
|
||||
if (notification.telegramTemplateParseMode !== "plain") {
|
||||
params.parse_mode = notification.telegramTemplateParseMode;
|
||||
}
|
||||
}
|
||||
|
||||
await axios.get(`${url}/bot${notification.telegramBotToken}/sendMessage`, {
|
||||
params: params,
|
||||
});
|
||||
|
Reference in New Issue
Block a user