mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-09 23:16:32 +08:00
Merge remote-tracking branch 'origin/master' into notification-provider-pagertree
# Conflicts: # src/lang/en.json
This commit is contained in:
@@ -42,7 +42,7 @@ class Slack extends NotificationProvider {
|
||||
const time = heartbeatJSON["time"];
|
||||
const textMsg = "Uptime Kuma Alert";
|
||||
let data = {
|
||||
"text": monitorJSON ? textMsg + `: ${monitorJSON.name}` : textMsg,
|
||||
"text": `${textMsg}\n${msg}`,
|
||||
"channel": notification.slackchannel,
|
||||
"username": notification.slackusername,
|
||||
"icon_emoji": notification.slackiconemo,
|
||||
|
@@ -9,11 +9,18 @@ class Telegram extends NotificationProvider {
|
||||
let okMsg = "Sent Successfully.";
|
||||
|
||||
try {
|
||||
let params = {
|
||||
chat_id: notification.telegramChatID,
|
||||
text: msg,
|
||||
disable_notification: notification.telegramSendSilently ?? false,
|
||||
protect_content: notification.telegramProtectContent ?? false,
|
||||
};
|
||||
if (notification.telegramMessageThreadID) {
|
||||
params.message_thread_id = notification.telegramMessageThreadID;
|
||||
}
|
||||
|
||||
await axios.get(`https://api.telegram.org/bot${notification.telegramBotToken}/sendMessage`, {
|
||||
params: {
|
||||
chat_id: notification.telegramChatID,
|
||||
text: msg,
|
||||
},
|
||||
params: params,
|
||||
});
|
||||
return okMsg;
|
||||
|
||||
|
Reference in New Issue
Block a user