From 7ab1061904e4cb5f1ee99a585e3b520b3f350109 Mon Sep 17 00:00:00 2001 From: Tyler Perkins <45907232+Clortox@users.noreply.github.com> Date: Fri, 16 Dec 2022 21:14:37 -0500 Subject: [PATCH] Add Icon and Attachment support (#9) --- main.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/main.sh b/main.sh index d27bed3..44ff524 100755 --- a/main.sh +++ b/main.sh @@ -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