mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-23 20:34:27 +02:00
mod/notification-ntfy: use custom user agent string
This commit is contained in:
parent
ca2e5f2a01
commit
fb865ba114
1 changed files with 3 additions and 1 deletions
|
@ -72,6 +72,7 @@
|
||||||
|
|
||||||
:global CertificateAvailable;
|
:global CertificateAvailable;
|
||||||
:global EitherOr;
|
:global EitherOr;
|
||||||
|
:global FetchUserAgentStr;
|
||||||
:global IfThenElse;
|
:global IfThenElse;
|
||||||
:global LogPrint;
|
:global LogPrint;
|
||||||
:global SymbolForNotification;
|
:global SymbolForNotification;
|
||||||
|
@ -87,7 +88,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
:local Url ("https://" . $NtfyServer . "/" . [ $UrlEncode $NtfyTopic ]);
|
:local Url ("https://" . $NtfyServer . "/" . [ $UrlEncode $NtfyTopic ]);
|
||||||
:local Headers ({ ("Priority: " . [ $IfThenElse ($Notification->"silent") "low" "default" ]); \
|
:local Headers ({ [ $FetchUserAgentStr ($Notification->"origin") ]; \
|
||||||
|
("Priority: " . [ $IfThenElse ($Notification->"silent") "low" "default" ]); \
|
||||||
("Title: " . "[" . $IdentityExtra . $Identity . "] " . ($Notification->"subject")) });
|
("Title: " . "[" . $IdentityExtra . $Identity . "] " . ($Notification->"subject")) });
|
||||||
:local Text (($Notification->"message") . "\n");
|
:local Text (($Notification->"message") . "\n");
|
||||||
:if ([ :len ($Notification->"link") ] > 0) do={
|
:if ([ :len ($Notification->"link") ] > 0) do={
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue