You've already forked uptime-kuma
mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-11-23 22:37:10 +02:00
feat: Disabled telegram links preview (#6335)
This commit is contained in:
@@ -17,6 +17,7 @@ class Telegram extends NotificationProvider {
|
|||||||
text: msg,
|
text: msg,
|
||||||
disable_notification: notification.telegramSendSilently ?? false,
|
disable_notification: notification.telegramSendSilently ?? false,
|
||||||
protect_content: notification.telegramProtectContent ?? false,
|
protect_content: notification.telegramProtectContent ?? false,
|
||||||
|
link_preview_options: { is_disabled: true },
|
||||||
};
|
};
|
||||||
if (notification.telegramMessageThreadID) {
|
if (notification.telegramMessageThreadID) {
|
||||||
params.message_thread_id = notification.telegramMessageThreadID;
|
params.message_thread_id = notification.telegramMessageThreadID;
|
||||||
@@ -30,9 +31,9 @@ class Telegram extends NotificationProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let config = this.getAxiosConfigWithProxy({ params });
|
let config = this.getAxiosConfigWithProxy();
|
||||||
|
|
||||||
await axios.get(`${url}/bot${notification.telegramBotToken}/sendMessage`, config);
|
await axios.post(`${url}/bot${notification.telegramBotToken}/sendMessage`, params, config);
|
||||||
return okMsg;
|
return okMsg;
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user