@@ -115,7 +115,7 @@ for channel in ${channels}; do
115115 if [[ " ${always_notify} " != " true" && -z " ${TEXT_FILE_CONTENT} " && -n " ${text_file} " ]]; then
116116 text_interpolated=" "
117117 else
118- if [[ " ${attachments} " == " null " ]]; then
118+ if [[ -z " ${attachments} " ]]; then
119119 TEXT_FILE_CONTENT=${TEXT_FILE_CONTENT:- " _(no notification provided)_" }
120120 fi
121121
@@ -124,7 +124,7 @@ for channel in ${channels}; do
124124 if [[ -z " ${text_interpolated} " ]]; then
125125 text_interpolated=" _(missing notification text)_"
126126 if [[ -n " ${attachments} " ]]; then
127- text_interpolated=" null "
127+ text_interpolated=" "
128128 fi
129129 fi
130130
@@ -138,18 +138,18 @@ for channel in ${channels}; do
138138 --arg " text_interpolated" " ${text_interpolated} " \
139139 --arg " username" " ${username} " \
140140 --argjson " link_names" " ${link_names} " \
141- --arg " icon_url" " ${icon_url} " \
142- --arg " icon_emoji" " ${icon_emoji} " \
143- --arg " channel" " ${channel} " \
144- --arg " attachments" " ${attachments} " \
141+ --arg " icon_url" " ${icon_url} " \
142+ --arg " icon_emoji" " ${icon_emoji} " \
143+ --arg " channel" " ${channel} " \
144+ --arg " attachments" " ${attachments} " \
145145 ' {
146- text: $text_interpolated,
147- username: $username // null,
146+ text: $text_interpolated // null ,
147+ username: $username // null,
148148 link_names: $link_names,
149- icon_url: $icon_url // null,
150- icon_emoji: $icon_emoji // null,
151- channel: $channel // null,
152- attachments: $attachments // null
149+ icon_url: $icon_url // null,
150+ icon_emoji: $icon_emoji // null,
151+ channel: $channel // null,
152+ attachments: $attachments // null
153153 }'
154154 )
155155
0 commit comments