diff --git a/notify_templates/notify_v2.sh b/notify_templates/notify_v2.sh index 436e312..79ab6a4 100644 --- a/notify_templates/notify_v2.sh +++ b/notify_templates/notify_v2.sh @@ -209,12 +209,16 @@ format_output() { if [[ -z "${UpdToString}" ]]; then FormattedOutput="None" else - if [[ "${UpdateType}" == "dockcheck_update" ]]; then + if [[ "${UpdateType}" == "container_update" ]]; then + FormattedOutput="${FormattedTextTemplate//${UpdToString}}" + elif [[ "${UpdateType}" == "notify_update" ]]; then + FormattedOutput="${FormattedTextTemplate//${UpdToString}}" + elif [[ "${UpdateType}" == "dockcheck_update" ]]; then FormattedOutput="${FormattedTextTemplate//$4}" FormattedOutput="${FormattedTextTemplate//$5}" FormattedOutput="${FormattedTextTemplate//$6}" else - FormattedOutput="${FormattedTextTemplate//${UpdToString}}" + FormattedOutput="Invalid input" fi fi fi @@ -333,7 +337,7 @@ notify_update_notification() { local template=$(get_channel_template "${channel}") # Formats UpdToString variable per channel settings - format_output "notify_update" "$(output_format "${channel}")" "Notify templates on $FromHost with updates available:\n\n" + format_output "notify_update" "$(output_format "${channel}")" "Notify templates on $FromHost with updates available:\n\n" # Setting the MessageBody variable here. printf -v MessageBody "${FormattedOutput}"