Browse Source

Update telegram.sh

(fix shellcheck failure)
pull/3479/head
Mike Beattie 4 years ago
committed by GitHub
parent
commit
fb079f9e50
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      notify/telegram.sh

2
notify/telegram.sh

@ -38,7 +38,7 @@ telegram_send() {
export _H1="Content-Type: application/json" export _H1="Content-Type: application/json"
_telegram_bot_url="https://api.telegram.org/bot${TELEGRAM_BOT_APITOKEN}/sendMessage" _telegram_bot_url="https://api.telegram.org/bot${TELEGRAM_BOT_APITOKEN}/sendMessage"
if _post "$_data" "$_telegram_bot_url" > /dev/null; then
if _post "$_data" "$_telegram_bot_url" >/dev/null; then
# shellcheck disable=SC2154 # shellcheck disable=SC2154
_message=$(printf "%s\n" "$response" | sed -n 's/.*"ok":\([^,]*\).*/\1/p') _message=$(printf "%s\n" "$response" | sed -n 's/.*"ok":\([^,]*\).*/\1/p')
if [ "$_message" = "true" ]; then if [ "$_message" = "true" ]; then

Loading…
Cancel
Save