global-functions: add identity tag in $SendNotification

... and send subject in telegram message.
This commit is contained in:
Christian Hesse 2018-11-27 14:08:14 +01:00
parent c4f8c1ad52
commit 6e4d715937
9 changed files with 13 additions and 11 deletions

View file

@ -32,7 +32,7 @@
"&latest=" . $latestversion) output=user as-value ];
:if ($result->"status" = "finished" && $result->"data" = $latestversion) do={
:log info ("Version " . $latestversion . " is assumed safe, updating...");
$SendNotification ("[" . $identity . "] RouterOS update notification") \
$SendNotification ("RouterOS update notification") \
("Version " . $latestversion . " is assumed safe for " . $channel . \
", updating on " . $identity . "...");
/ system package update install;
@ -45,7 +45,7 @@
$latestversion . ".");
}
$SendNotification ("[" . $identity . "] RouterOS update notification") \
$SendNotification ("RouterOS update notification") \
("There is a RouterOS update available\n\n" . \
"Routerboard: " . $model . "\n" . \
"Serial number: " . $serialnumber . "\n" . \