mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-16 04:54:28 +02:00
mod/notification-*: support extra text (or emojis 🚀) in notification tags
This commit is contained in:
parent
c8e22f33c2
commit
47a657d25c
6 changed files with 16 additions and 7 deletions
|
@ -56,6 +56,7 @@
|
|||
:local Notification $1;
|
||||
|
||||
:global Identity;
|
||||
:global IdentityExtra;
|
||||
:global MatrixAccessToken;
|
||||
:global MatrixAccessTokenOverride;
|
||||
:global MatrixHomeServer;
|
||||
|
@ -106,10 +107,11 @@
|
|||
:return false;
|
||||
}
|
||||
|
||||
:local Plain [ $PrepareText ("## [" . $Identity . "] " . ($Notification->"subject") . "\n```\n" . \
|
||||
($Notification->"message") . "\n```") "plain" ];
|
||||
:local Formatted ("<h2>" . [ $PrepareText ("[" . $Identity . "] " . ($Notification->"subject")) "format" ] . "</h2>" . \
|
||||
"<pre><code>" . [ $PrepareText ($Notification->"message") "format" ] . "</code></pre>");
|
||||
:local Plain [ $PrepareText ("## [" . $IdentityExtra . $Identity . "] " . \
|
||||
($Notification->"subject") . "\n```\n" . ($Notification->"message") . "\n```") "plain" ];
|
||||
:local Formatted ("<h2>" . [ $PrepareText ("[" . $IdentityExtra . $Identity . "] " . \
|
||||
($Notification->"subject")) "format" ] . "</h2>" . "<pre><code>" . \
|
||||
[ $PrepareText ($Notification->"message") "format" ] . "</code></pre>");
|
||||
:if ([ :len ($Notification->"link") ] > 0) do={
|
||||
:set Plain ($Plain . "\\n" . [ $SymbolForNotification "link" ] . \
|
||||
[ $PrepareText ("[" . $Notification->"link" . "](" . $Notification->"link" . ")") "plain" ]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue