From d7725540f884bf7486274f0e002cf2ba1b41306e Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 26 Nov 2020 22:06:03 +0100 Subject: global-functions: $SendTelegram: change internal wording --- global-functions | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'global-functions') diff --git a/global-functions b/global-functions index ee13de8..9c5e76e 100644 --- a/global-functions +++ b/global-functions @@ -779,12 +779,12 @@ :global IfThenElse; :if ($TelegramFixedWidthFont != true) do={ - :return ($1 . [ $IfThenElse ($2 = "fixed") "\n" "" ]); + :return ($1 . [ $IfThenElse ($2 = "body") "\n" "" ]); } :local Return $1; :local Chars { - "fixed"={ "\\"; "`" }; + "body"={ "\\"; "`" }; "hint"={ "_"; "*"; "["; "]"; "("; ")"; "~"; "`"; ">"; "#"; "+"; "-"; "="; "|"; "{"; "}"; "."; "!" }; } @@ -792,7 +792,7 @@ :set Return [ $CharacterReplace $Return $Char ("\\" . $Char) ]; } - :if ($2 = "fixed") do={ + :if ($2 = "body") do={ :return ("```\n" . $Return . "\n```"); } @@ -810,11 +810,11 @@ :local Text ("[" . $Identity . "] " . $Subject . "\n\n" . $Message); :if ([ :len $Text ] > 3968) do={ - :set Text ([ $EscapeMD ([ :pick $Text 0 3840 ] . "...") "fixed" ] . \ + :set Text ([ $EscapeMD ([ :pick $Text 0 3840 ] . "...") "body" ] . \ "\n" . [ $SymbolForNotification "scissors" ] . \ [ $EscapeMD "The Telegram message was too long and has been truncated!" "hint" ]); } else={ - :set Text [ $EscapeMD $Text "fixed" ]; + :set Text [ $EscapeMD $Text "body" ]; } :set Text [ $UrlEncode $Text ]; :local ParseMode [ $IfThenElse ($TelegramFixedWidthFont = true) "MarkdownV2" "" ]; -- cgit v1.2.3-70-g09d2