diff --git a/notify.sh b/notify.sh index ed3b917..4055816 100644 --- a/notify.sh +++ b/notify.sh @@ -47,12 +47,12 @@ send_ntfy() { # Disable exit on error for curl set +e - response=$(curl -s -w "\n%{http_code}" --http1.1 -k $auth_args -X POST "$NTFY_URL/$NTFY_TOPIC" \ + response=$(printf "%s" "$MESSAGE" | curl -s -w "\n%{http_code}" --http1.1 -k $auth_args -X POST "$NTFY_URL/$NTFY_TOPIC" \ -H "Title: $ICON $TITLE" \ -H "Priority: 4" \ -H "Click: $click_url" \ -H "Actions: view, Open Logs, $click_url" \ - -d "$MESSAGE" 2>&1) + --data-binary @- 2>&1) curl_exit_code=$? set -e