Add Icon and Attachment support (#9)
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Tyler Perkins 2022-12-16 21:14:37 -05:00 committed by GitHub
parent 4bab19d289
commit 7ab1061904
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 3 deletions

13
main.sh
View File

@ -6,7 +6,6 @@ Priority=${PLUGIN_PRIORITY:-}
Title=${PLUGIN_TITLE:-}
Tags=${PLUGIN_TAGS:-}
Click=${PLUGIN_CLICK:-}
Attach=${PLUGIN_ATTACH:-}
Icon=${PLUGIN_ICON:-}
@ -33,5 +32,13 @@ if [[ ! -z $Click ]]; then
Click="-H Click:$Click"
fi
curl $Priority $Title $Tags $Click -u $Username:$Password -d "$Message" $URL/$Topic
#echo curl $Priority $Title $Tags $Click -u $Username:$Password -d "$Message" $URL/$Topic
if [[ ! -z $Attach ]]; then
Attach="-H Attach:$Attach"
fi
if [[ ! -z $Icon ]]; then
Icon="-H Icon:$Icon"
fi
curl $Priority $Title $Tags $Click $Attach $Icon -u $Username:$Password -d "$Message" $URL/$Topic
#curl $Priority $Title $Tags $Click $Attach $Icon -u $Username:$Password -d "$Message" $URL/$Topic