From d796cb1bf0b811aaeb8d4607650e2a4fbe456894 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Thu, 8 Mar 2018 23:11:48 +0100 Subject: [PATCH] deploy.sh: Telegram message is now HTML formatted. --- deploy.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy.sh b/deploy.sh index ea3e0a9..730c01c 100755 --- a/deploy.sh +++ b/deploy.sh @@ -73,10 +73,10 @@ echo "Pushing the docker image..." docker push fabianonline/telegram_backup echo "Notifying the Telegram group..." -release_notes=$(sed 's/\* /• /' <<< "$release_notes") -message="Version $VERSION released"$'\n'$'\n'"$release_notes"$'\n'$'\n'"$release_url" +release_notes=$(sed 's/\* /• /' | sed 's/&/&/g' | sed 's//\>/g' <<< "$release_notes") +message="Version $VERSION was just released"$'\n'$'\n'"$release_notes"$'\n'$'\n'"$release_url" -curl https://api.telegram.org/bot${BOT_TOKEN}/sendMessage -XPOST --form "text=<-" --form-string "chat_id=${CHAT_ID}" <<< "$message" +curl https://api.telegram.org/bot${BOT_TOKEN}/sendMessage -XPOST --form "text=<-" --form-string "chat_id=${CHAT_ID}" --form-string "parse_mode=HTML" --form-string "disable_web_page_preview=true" <<< "$message" echo "Cleaning release_notes.txt..." > release_notes.txt