aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/notification-telegram5
1 files changed, 4 insertions, 1 deletions
diff --git a/mod/notification-telegram b/mod/notification-telegram
index 69c4801..c90e3f0 100644
--- a/mod/notification-telegram
+++ b/mod/notification-telegram
@@ -34,6 +34,7 @@
("https://api.telegram.org/bot" . ($Message->"tokenid") . "/sendMessage") \
http-data=("chat_id=" . ($Message->"chatid") . \
"&disable_notification=" . ($Message->"silent") . \
+ "&reply_to_message_id=" . ($Notification->"replyto") . \
"&disable_web_page_preview=true&parse_mode=" . ($Message->"parsemode") . \
"&text=" . ($Message->"text")) as-value;
:set ($TelegramQueue->$Id);
@@ -137,6 +138,7 @@
/tool/fetch check-certificate=yes-without-crl output=none http-method=post \
("https://api.telegram.org/bot" . $TokenId . "/sendMessage") \
http-data=("chat_id=" . $ChatId . "&disable_notification=" . ($Notification->"silent") . \
+ "&reply_to_message_id=" . ($Notification->"replyto") . \
"&disable_web_page_preview=true&parse_mode=" . $ParseMode . "&text=" . $Text) as-value;
} on-error={
$LogPrintExit2 info $0 ("Failed sending telegram notification! Queuing...") false;
@@ -148,7 +150,8 @@
[ $EscapeMD ("This message was queued since " . [ /system/clock/get date ] . \
" " . [ /system/clock/get time ] . " and may be obsolete.") "plain" ]) ]);
:set ($TelegramQueue->[ :len $TelegramQueue ]) { chatid=$ChatId; tokenid=$TokenId;
- parsemode=$ParseMode; text=$Text; silent=($Notification->"silent") };
+ parsemode=$ParseMode; text=$Text; silent=($Notification->"silent");
+ replyto=($Notification->"replyto") };
:if ([ :len [ /system/scheduler/find where name="\$FlushTelegramQueue" ] ] = 0) do={
/system/scheduler/add name="\$FlushTelegramQueue" interval=1m start-time=startup \
on-event=(":global FlushTelegramQueue; \$FlushTelegramQueue;");