1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

mod/notification-matrix: string protocol for display

This commit is contained in:
Christian Hesse
2024-04-19 09:04:08 +02:00
parent 6fd0becf64
commit 8cd03167ca

View File

@@ -76,6 +76,7 @@
:global EitherOr;
:global FetchUserAgentStr;
:global LogPrint;
:global ProtocolStrip;
:global SymbolForNotification;
:local PrepareText do={
@@ -117,11 +118,12 @@
($Notification->"subject")) ] . "</h2>" . "<pre><code>" . \
[ $PrepareText ($Notification->"message") ] . "</code></pre>");
:if ([ :len ($Notification->"link") ] > 0) do={
:local Label [ $ProtocolStrip ($Notification->"link") ];
:set Plain ($Plain . "\n" . [ $SymbolForNotification "link" ] . \
"[" . $Notification->"link" . "](" . $Notification->"link" . ")");
"[" . $Label . "](" . $Notification->"link" . ")");
:set Formatted ($Formatted . "<br/>" . [ $SymbolForNotification "link" ] . \
"<a href=\"" . [ $PrepareText ($Notification->"link") ] . "\">" . \
[ $PrepareText ($Notification->"link") ] . "</a>");
[ $PrepareText $Label ] . "</a>");
}
:do {