Bugfix for failing message sending if debugging was disabled.

This commit is contained in:
Fabian Schlenz 2017-01-23 19:43:06 +01:00
parent 4e00d71c8b
commit 98913400e5
1 changed files with 1 additions and 1 deletions

View File

@ -220,8 +220,8 @@ fi
for id in "${CHATS[@]}"; do
response=`curl $CURL_OPTIONS --form-string chat_id=$id $URL$TOKEN/$METHOD <<< "$TEXT"`
log "Response was: $response"
status=$?
log "Response was: $response"
if [ $status -ne 0 ]; then
echo "curl reported an error. Exit code was: $status."
echo "Response was: $response"