mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-07-03 18:22:44 +00:00
_subject/_content passed through json encoder, 'borrowed' the _H1 line from slack.sh to specify content type
This commit is contained in:
parent
d94b347733
commit
8f2a8a8383
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
#Support PUSHOVER.com api
|
#Support for pushover.net's api. Push notification platform for multiple platforms
|
||||||
|
|
||||||
PUSHOVER_URI="https://api.pushover.net/1/messages.json"
|
PUSHOVER_URI="https://api.pushover.net/1/messages.json"
|
||||||
|
|
||||||
@ -32,6 +32,9 @@ pushover_send() {
|
|||||||
fi
|
fi
|
||||||
_saveaccountconf_mutable PUSHOVER_SOUND "$PUSHOVER_SOUND"
|
_saveaccountconf_mutable PUSHOVER_SOUND "$PUSHOVER_SOUND"
|
||||||
|
|
||||||
|
export _H1="Content-Type: application/json"
|
||||||
|
_content="$(printf "*%s*\n" "$_content" | _json_encode)"
|
||||||
|
_subject="$(printf "*%s*\n" "$_subject" | _json_encode)"
|
||||||
_data="{\"token\": \"$PUSHOVER_TOKEN\",\"user\": \"$PUSHOVER_USER\",\"title\": \"$_subject\",\"message\": \"$_content\",\"sound\": \"$PUSHOVER_SOUND\"}"
|
_data="{\"token\": \"$PUSHOVER_TOKEN\",\"user\": \"$PUSHOVER_USER\",\"title\": \"$_subject\",\"message\": \"$_content\",\"sound\": \"$PUSHOVER_SOUND\"}"
|
||||||
|
|
||||||
response="" #just make shellcheck happy
|
response="" #just make shellcheck happy
|
||||||
|
Loading…
x
Reference in New Issue
Block a user